Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- long long q;
- bool porownaj(int a, int b)
- {
- return a>b;
- }
- int main()
- {
- cin >> q;
- long long t[q];
- long long w[q+1];
- w[0]=1;
- for(int i=0;i<q;i++)
- {
- cin >>t[i];
- }
- for(int i=0;i<q-1;i++)
- {
- if(t[i]>t[i+1])
- w[i]=1;
- else w[i]+=1;
- }
- sort(w,w+q, porownaj);
- cout << w[0]<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement