Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// https://trello.com/c/i4U2jyMu/28-problem-702a-codeforces
- /// http://codeforces.com/problemset/problem/702/A
- #include <iostream>
- #include <vector>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- vector <long long> v (n);
- for (int i=0; i<n; i++)
- cin>>v[i];
- v.push_back(0);
- long ulti = 0;
- long cant = 0;
- long may = 0;
- for (int i=0; i<=n; i++)
- {
- if (v[i] > ulti)
- cant++;
- else
- cant=1;
- ulti = v[i];
- may = max(may, cant);
- }
- cout<<may;
- return 0;
- }
Add Comment
Please, Sign In to add comment