#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> nums(n); for (int i = 0; i < n; ++i) cin >> nums[i]; int farthest = 0; for (int i = 0; i <= farthest; ++i) { farthest = max(farthest, i + nums[i]); if (farthest >= n - 1) { // 可以到达最后 cout << "true\n"; return 0; } } cout << "false\n"; return 0; }