# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
34348 | 2017-11-10T15:29:56 Z | mohammad_kilani | Calvinball championship (CEOI15_teams) | C++14 | 1000 ms | 2652 KB |
#include <bits/stdc++.h> using namespace std; #define mod 1000007 #define oo 2000000000 const int N = 1000010; vector<int> arr; int cur = 0 , n , d; void solve(vector<int> &v,int i,int mx){ if(i == n){ cur++; cur %= mod; if(v == arr){ cout << cur << endl; exit(0); } return; } for(int j=1;j<=mx+1;j++){ v[i] = j; solve(v,i+1,max(mx,j)); } } int main() { //freopen("in.txt","r",stdin); scanf("%d",&n); for(int i=0;i<n;i++){ int a; scanf("%d",&a); arr.push_back(a); } vector<int> v(n); solve(v,0,0); 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 | 2648 KB | Execution timed out |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2340 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 1000 ms | 2652 KB | Execution timed out |
2 | Halted | 0 ms | 0 KB | - |