# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
413463 | 2021-05-28T18:37:26 Z | jjj | Unscrambling a Messy Bug (IOI16_messy) | C++14 | 1 ms | 296 KB |
#include <bits/stdc++.h> #include "messy.h" #define MAXN 140 int p[MAXN]; bool b[MAXN]; std::vector<int> v; std::vector<int> restore_permutation(int n, int w, int r) { if(n == 8) { add_element("10000000"); add_element("11000000"); add_element("11100000"); add_element("11110000"); add_element("11111000"); add_element("11111100"); add_element("11111110"); add_element("11111111"); compile_set(); std::string x = "00000000"; for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(x[j] == '1') continue; x[j] = '1'; if(check_element(x)) { p[i] = j; break; } x[j] = '0'; } } } if(n == 32) { add_element("10000000000000000000000000000000"); add_element("11000000000000000000000000000000"); add_element("11100000000000000000000000000000"); add_element("11110000000000000000000000000000"); add_element("11111000000000000000000000000000"); add_element("11111100000000000000000000000000"); add_element("11111110000000000000000000000000"); add_element("11111111000000000000000000000000"); add_element("11111111100000000000000000000000"); add_element("11111111110000000000000000000000"); add_element("11111111111000000000000000000000"); add_element("11111111111100000000000000000000"); add_element("11111111111110000000000000000000"); add_element("11111111111111000000000000000000"); add_element("11111111111111100000000000000000"); add_element("11111111111111110000000000000000"); add_element("11111111111111111000000000000000"); add_element("11111111111111111100000000000000"); add_element("11111111111111111110000000000000"); add_element("11111111111111111111000000000000"); add_element("11111111111111111111100000000000"); add_element("11111111111111111111110000000000"); add_element("11111111111111111111111000000000"); add_element("11111111111111111111111100000000"); add_element("11111111111111111111111110000000"); add_element("11111111111111111111111111000000"); add_element("11111111111111111111111111100000"); add_element("11111111111111111111111111110000"); add_element("11111111111111111111111111111000"); add_element("11111111111111111111111111111100"); add_element("11111111111111111111111111111110"); add_element("11111111111111111111111111111111"); std::string x = "00000000000000000000000000000000"; /* for(int i = 0; i < n; i++) { x[i] = '1'; add_element(x); } for(int i = 0; i < n; i++) x[i] = '0'; */ for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(x[j] == '1') continue; x[j] == '1'; if(check_element(x)) { p[i] = j; break; } x[j] = '0'; } } } for(int i = 0; i < n; i++) v.push_back(p[i]); // add_element("0"); // compile_set(); // check_element("0"); return std::vector<int>(v); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | n = 8 |
2 | Correct | 1 ms | 204 KB | n = 8 |
3 | Correct | 1 ms | 204 KB | n = 8 |
4 | Correct | 1 ms | 204 KB | n = 8 |
5 | Correct | 1 ms | 204 KB | n = 8 |
6 | Correct | 1 ms | 204 KB | n = 8 |
7 | Correct | 1 ms | 204 KB | n = 8 |
8 | Correct | 1 ms | 292 KB | n = 8 |
9 | Correct | 1 ms | 292 KB | n = 8 |
10 | Correct | 1 ms | 204 KB | n = 8 |
11 | Correct | 1 ms | 204 KB | n = 8 |
12 | Correct | 1 ms | 296 KB | n = 8 |
13 | Correct | 1 ms | 204 KB | n = 8 |
14 | Correct | 1 ms | 204 KB | n = 8 |
15 | Correct | 1 ms | 204 KB | n = 8 |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | grader returned WA |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | grader returned WA |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | grader returned WA |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | grader returned WA |
2 | Halted | 0 ms | 0 KB | - |