-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path702B.cpp
More file actions
41 lines (37 loc) · 732 Bytes
/
702B.cpp
File metadata and controls
41 lines (37 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double lld;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef pair<int,int> pii;
typedef pair<long long,long long> pll;
const ll INF = 1e18;
const ll MOD = 1e9 + 7;
void solve() {
ll n;
cin>>n;
vector<ll>nums(n);
for(int i = 0 ; i < n ;i++){
cin>>nums[i];
}
ll max_len = 1;
ll curr_len = 1;
for(int i = 0 ; i < n - 1 ;i++){
if(nums[i] < nums[i + 1]){
curr_len++;
}
else{
curr_len = 1;
}
max_len = max(max_len , curr_len);
}
cout<<max_len;
}
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
}