You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
473 B

#include <bits/stdc++.h>
using namespace std;
int a[1000001];
int N;
int _max = 1;
int currentmax = 1;
int main() {
cin >> N;
for (int i = 0; i < N; i++) {
cin >> a[i];
}
for (int i = 1; i < N; i++) {
if (a[i] > a[i - 1]) {
currentmax++;
} else {
if (currentmax > _max) {
_max = currentmax;
}
currentmax = 1;
}
}
cout << _max << endl;
return 0;
}