# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
23661 | 2017-05-18T10:50:31 Z | TAMREF | Boat (APIO16_boat) | C++11 | 0 ms | 2024 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MX=505; const int mod=1000000007; int N, A[MX], B[MX]; void input(){ scanf("%d",&N); for(int i=1;i<=N;i++) scanf("%d %d",&A[i],&B[i]); } void task1(){ ll D[MX]={1}; for(int i=1,j;i<=N;i++){ for(j=i-1;B[j]>=B[i];--j); D[i]=(D[i-1]+D[j])%mod; } printf("%lld\n",((D[N]-1)%mod+mod)%mod); } int main(){ input(); task1(); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2024 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2024 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2024 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 2024 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |