1
反蝴蝶效应
http://www.nowcoder.com/questionTerminal/026e05f10d734e4ca9ffd10ff1330996
include<bits/stdc++.h>
using namespace std;
int a[10000000];
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
for(int i = 1; i <= n; i++)
{
cin >> a[i];
}
int maxx = 0;
for(int i = n; i >= 1; i--)
{
maxx++;
if(a[i] > maxx)
{
maxx = a[i];
}
}
cout << maxx << "\n";
return 0;
}