Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul255 authored Mar 14, 2019
1 parent 5a3e5d9 commit cc5715e
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 580A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

#include <iostream>
using namespace std;

int main()
{
int n, count=1, result=1;
cin >> n;
int s[n];

for (int i = 0; i < n; i++)
{
cin >> s[i];
if (i > 0)
if (s[i] >= s[i - 1])
{
count++;
result = max(result, count);
}
else
count = 1;
}

cout << result << endl;
return 0;
}

0 comments on commit cc5715e

Please sign in to comment.