# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
144994 | 2019-08-18T10:46:27 Z | MKopchev | Zalmoxis (BOI18_zalmoxis) | C++14 | 201 ms | 18760 KB |
#include<bits/stdc++.h> using namespace std; const int nmax=1e6+42; int n,k; int inp[nmax]; vector<int> output; int pos=1; void go(int num) { if(pos>n||inp[pos]>num) { output.push_back(num); return; } if(inp[pos]==num) { pos++; output.push_back(num); return; } go(num-1); go(num-1); } int main() { scanf("%i%i",&n,&k); for(int i=1;i<=n;i++)scanf("%i",&inp[i]); go(30); assert(output.size()==n+k); for(auto p:output) printf("%i ",p); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 194 ms | 12380 KB | Output is correct |
2 | Correct | 195 ms | 12380 KB | Output is correct |
3 | Correct | 201 ms | 12384 KB | Output is correct |
4 | Correct | 194 ms | 12380 KB | Output is correct |
5 | Correct | 195 ms | 12508 KB | Output is correct |
6 | Correct | 193 ms | 12384 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 125 ms | 18524 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Correct | 194 ms | 12356 KB | Output is correct |
3 | Runtime error | 125 ms | 18700 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
4 | Runtime error | 125 ms | 18740 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
5 | Runtime error | 125 ms | 18760 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
6 | Runtime error | 125 ms | 18596 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
7 | Runtime error | 125 ms | 18688 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
8 | Runtime error | 133 ms | 18652 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
9 | Runtime error | 105 ms | 16092 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
10 | Runtime error | 47 ms | 7144 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
11 | Runtime error | 76 ms | 11100 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
12 | Runtime error | 3 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
13 | Runtime error | 3 ms | 376 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
14 | Runtime error | 2 ms | 504 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |