# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
165836 | 2019-11-29T09:43:59 Z | Segtree | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 5 ms | 632 KB |
#include"messy.h" #include<iostream> #include<vector> using namespace std; typedef long long ll; vector<int> restore_permutation(int n,int W,int R){ string s[10]; for(int i=0;i<n-1;i++){ for(int j=0;j<=i;j++)s[i]+='0'; for(int j=i+1;j<n;j++)s[i]+='1'; add_element(s[i]); } compile_set(); for(int i=0;i<n;i++)for(int j=i;j<n;j++){ bool ok=1; for(int k=0;k<n-1;k++){ string t=s[k]; swap(t[i],t[j]); ok&=check_element(t); } if(ok){ vector<int> p(n); for(int k=0;k<n;k++)p[k]=k; swap(p[i],p[j]); return p; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | n = 8 |
2 | Correct | 2 ms | 256 KB | n = 8 |
3 | Correct | 2 ms | 256 KB | n = 8 |
4 | Correct | 2 ms | 376 KB | n = 8 |
5 | Correct | 2 ms | 256 KB | n = 8 |
6 | Correct | 2 ms | 376 KB | n = 8 |
7 | Correct | 2 ms | 256 KB | n = 8 |
8 | Correct | 2 ms | 376 KB | n = 8 |
9 | Correct | 2 ms | 376 KB | n = 8 |
10 | Correct | 2 ms | 256 KB | n = 8 |
11 | Correct | 2 ms | 376 KB | n = 8 |
12 | Correct | 2 ms | 376 KB | n = 8 |
13 | Correct | 2 ms | 256 KB | n = 8 |
14 | Correct | 2 ms | 376 KB | n = 8 |
15 | Correct | 2 ms | 376 KB | n = 8 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 4 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 5 ms | 632 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |