# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1109957 |
2024-11-08T09:01:58 Z |
dsyz |
Boat (APIO16_boat) |
C++17 |
|
2 ms |
336 KB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define MAXN (1000005)
ll mod = 1e9 + 7;
int main(){
ios_base::sync_with_stdio(false);cin.tie(0);
ll N;
cin>>N;
ll A[N], B[N];
for(ll i = 0;i < N;i++){
cin>>A[i]>>B[i];
}
ll dp[N];
memset(dp,0,sizeof(dp));
dp[0] = 1;
for(ll i = 1;i < N;i++){
for(ll j = 0;j < i;j++){
if(A[j] < A[i]){
dp[i] += dp[j];
dp[i] %= mod;
}
}
}
ll sum = 0;
for(ll i = 0;i < N;i++){
sum += dp[i];
sum %= mod;
}
cout<<sum<<'\n';
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |