Pagini recente » Istoria paginii runda/fcgd | Cod sursa (job #1189031) | Cod sursa (job #963475) | Cod sursa (job #659247) | Cod sursa (job #3208297)
#include <iostream>
#include <fstream>
using namespace std;
ifstream fin("scmax.in");
ofstream fout("scmax.out");
int v[10000001];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; ++i) {
cin >> v[i];
}
int lgmax = 0;
for (int i = 1; i < n; ++i) {
int lg = 1;
int aux = v[i];
for (int j = i + 1; j <= n; ++j) {
if (v[j] > aux) {
aux = v[j];
++lg;
}
}
if (lg > lgmax) {
lgmax = lg;
}
}
cout << lgmax;
return 0;
}