# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23477 | mohammad_kilani | Boat (APIO16_boat) | C++14 | 0 ms | 2028 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;
int n , m ;
int a[1001];
int cur[1001];
int main(){
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
scanf("%d",&n);
int sum = 0 ;
for(int i=0;i<n;i++){
scanf("%d",&a[i]);
int b;
scanf("%d",&b);
for(int j=0;j<i;j++){
if(a[i] > a[j]){
cur[i]+=cur[j];
}
}
cur[i]++;
sum+=cur[i];
}
printf("%d\n",sum);
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... |