# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
34357 | 2017-11-10T16:43:43 Z | bnahmad15 | Calvinball championship (CEOI15_teams) | C++14 | 1000 ms | 2520 KB |
#include <bits/stdc++.h> using namespace std; int n; const int MOD = 1000007; long long cnt = 1; vector<int> ar; vector<int> hhh; void rec(int idx,int ce){ if (idx == n){ if (hhh==ar){ printf("%d",cnt); exit(0); } cnt = (cnt+1)%MOD; return ; } for (int i=1;i<=ce;i++){ hhh[idx]=i; rec(idx+1,max(i+1,ce)); } } int main(){ scanf("%d",&n); ar.resize(n); hhh.resize(n); for (int i = 0;i < n;i++) scanf("%d",&ar[i]); rec(0,1); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2016 KB | Output is correct |
2 | Correct | 0 ms | 2016 KB | Output is correct |
3 | Correct | 0 ms | 2016 KB | Output is correct |
4 | Correct | 0 ms | 2016 KB | Output is correct |
5 | Correct | 0 ms | 2016 KB | Output is correct |
6 | Correct | 0 ms | 2016 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 2016 KB | Output is correct |
2 | Correct | 0 ms | 2016 KB | Output is correct |
3 | Correct | 0 ms | 2016 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 243 ms | 2016 KB | Output is correct |
2 | Correct | 0 ms | 2016 KB | Output is correct |
3 | Execution timed out | 1000 ms | 2016 KB | Execution timed out |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2016 KB | Execution timed out |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2016 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2016 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2016 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2504 KB | Execution timed out |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2128 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2520 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |