'commit'
This commit is contained in:
27
LuoGu/RuMen/P1567.cpp
Normal file
27
LuoGu/RuMen/P1567.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user