# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
636799 | lovrot | Boat (APIO16_boat) | C++11 | 1 ms | 304 KiB |
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;
const int N = 510;
int n;
int a[N], b[N];
int main(){
scanf("%d", &n);
for(int i = 0; i < n; i++){
scanf("%d%d", &a[i], &b[i]);
}
int ans = 1;
for(int i = n - 2; i > -1; i--){
// printf("%d\n", i);
if(a[i] < a[i + 1]) ans++;
else break;
}
printf("%d\n", ans);
return 0;
}
Compilation message (stderr)
# | 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... |