This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, d;
cin >> n >> d;
assert(d==1);
int arr[n];
int ans[n];
cin >> arr[0];
ans[0]=1;
for(int i=1; i<n; i++){
cin >> arr[i];
if(arr[i]>arr[i-1]){
ans[i]=ans[i-1]+1;
}
else{
ans[i]=1;
}
}
int finans = 0;
for(int i=0; i<n; i++){
finans = max(finans, ans[i]);
}
cout << finans << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |