# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23477 | 2017-05-09T20:01:02 Z | mohammad_kilani | Boat (APIO16_boat) | C++14 | 0 ms | 2028 KB |
#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
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2028 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2028 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2028 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2028 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |