# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30799 | 2017-07-26T14:23:41 Z | inqr | Boat (APIO16_boat) | C++14 | 3 ms | 2184 KB |
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define rt insert #define st first #define nd second #define ll long long #define pii pair < int , int > #define DB printf("debug\n"); #define umax( x , y ) x = max( x , (y) ) #define umin( x , y ) x = min( x , (y) ) #define all(x) x.begin() , x.end() using namespace std; int n; ll ans=0,mod=1e9+7; int a[505],b[505]; void solve1(int sn,int mtn){ if(sn==n){ ans++; return; } ans%=mod; solve1(sn+1,mtn); if(mtn<a[sn])solve1(sn+1,a[sn]); } int main(){ cin.tie(0);ios_base::sync_with_stdio(0); freopen("boat.in","r",stdin); //freopen(".out","w",stdout); cin>>n; for(int i=0;i<n;i++)cin>>a[i]>>b[i]; solve1(0,0); cout<<ans; return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 2184 KB | Execution killed because of forbidden syscall gettid (186) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 2184 KB | Execution killed because of forbidden syscall gettid (186) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 2184 KB | Execution killed because of forbidden syscall gettid (186) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 3 ms | 2184 KB | Execution killed because of forbidden syscall gettid (186) |
2 | Halted | 0 ms | 0 KB | - |