#include<cstdio> using namespace std; int main() { int n; scanf("%d",&n); int a[n]; for (int i=0;i<n;i++){ scanf("%d",&a[i]); } int max=1,cur=1; for (int i=1;i<n;i++){ if (a[i]>a[i-1]){ cur++; } else{ if (max<cur) max=cur; cur=1; } } if (max<cur) max=cur; printf("%d\n",max); return 0; }
Tuesday, August 9, 2016
Codeforces : 702A - Maximum Increase
Unknown
Studying at Shahjalal University of Science and Technology, Sylhet.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment