Skip to content

Commit cc92884

Browse files
authored
Kefa and First Steps
1 parent 99cf085 commit cc92884

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
4+
int main(){
5+
int n,d=0,r=0,a[100000],i,s=0;
6+
cin>>n;
7+
for(i=0;i<n;i++)
8+
{
9+
cin>>a[i];
10+
if(a[i]>=d)
11+
{
12+
d=a[i];
13+
r++;
14+
}
15+
else
16+
{
17+
if(r>s)
18+
{
19+
s=r;
20+
}
21+
r=1;
22+
d=a[i];
23+
}
24+
}
25+
if(r>s)
26+
{
27+
s=r;
28+
}
29+
cout<<s;
30+
return 0;
31+
}

0 commit comments

Comments
 (0)