# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
451569 | 2021-08-03T09:09:36 Z | kingfran1907 | Question (Grader is different from the original contest) (CEOI14_question_grader) | C++14 | 7000 ms | 884 KB |
#include<bits/stdc++.h> using namespace std; int encode (int n, int x, int y) { vector< int > v; for (int i = 0; i < 6; i++) v.push_back(0); for (int i = 0; i < 6; i++) v.push_back(1); vector< vector< int > > vs; do { vector< int > tren; for (int i = 0; i < 12; i++) { if (v[i] == 1) tren.push_back(i); } vs.push_back(tren); } while (next_permutation(v.begin(), v.end())); for (auto iter : vs[x]) { bool flag = true; for (auto tren : vs[y]) { if (iter == tren) flag = false; } if (flag) return iter + 1; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 7033 ms | 884 KB | Time limit exceeded |
2 | Execution timed out | 7079 ms | 760 KB | Time limit exceeded |