# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1015185 |
2024-07-06T07:08:15 Z |
vjudge1 |
Boat (APIO16_boat) |
C++17 |
|
1 ms |
444 KB |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int const N=505;
int const mod=1e9+7;
int dp[N];
int arr[N];
signed main(){
int n;
cin>>n;
for (int i = 1; i <=n; ++i)
cin>>arr[i]>>arr[i];
dp[0]=1;
for(int i=1;i<=n;i++){
dp[i]=dp[i-1];
for(int j=i-1;j>=0;j--)
if(arr[j]<arr[i]){
dp[i]+=dp[j];
dp[i]%=mod;
break;
}
}
dp[n]--;
dp[n]+=mod;
dp[n]%=mod;
cout<<dp[n]<<endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
444 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |