-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path580A.cpp
56 lines (56 loc) · 1.04 KB
/
580A.cpp
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Jai shree ram
// Author - Ajaybansal
#include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vector<int>>
#define pi pair<int, int>
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) (x.begin().x.end())
//#define for(i, n) for (int i = 0; i < n; i++)
#define endl "\n"
#define ff first
#define ss second
#define Yes cout << "YES" << endl
#define No cout << "NO" << endl
#define int long long
void fast()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
}
signed solve()
{
fast();
int t, count = 1, sum = 1;
cin >> t;
int arr[t];
for(int i=0;i<t;i++)
{
int x;
cin >> arr[i];
// cout<<s[i];
}
for(int i=1;i<t;i++)
{
if (arr[i] >= arr[i-1])
{
sum++;
}
else{
sum=1;
}
if(sum>=count){
count=sum;
}
}
cout<<count<<endl;
return 0;
}
signed main()
{
solve();
}