Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n;
- cin>>n;
- int max_count = 1;
- int count = 1;
- int last;
- cin>>last;
- for(int i = 0; i < n - 1; i++) {
- int cur;
- cin>>cur;
- if(cur > last) {
- count++;
- if(count > max_count)
- max_count = count;
- } else {
- count = 1;
- }
- last = cur;
- }
- cout<<max_count;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement