# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1068720 | 2024-08-21T11:31:29 Z | TheQuantiX | Mechanical Doll (IOI18_doll) | C++17 | 86 ms | 10308 KB |
#include <bits/stdc++.h> #include "doll.h" using namespace std; using ll = long long; constexpr ll INF = 1000000000 - 1; ll nxt = -2; void create_circuit(int M, vector<int> A) { ll NN = A.size(); A.push_back(-1); ll N = A.size(); ll ex = 1; while (ex < N) { ex *= 2; } while (A.size() < ex) { A.push_back(-1); } N = A.size(); A[N - 1] = 0; vector<int> C, X, Y; C.push_back(-1); for (int i = 0; i < M; i++) { C.push_back(-1); } X.resize(N - 1); Y.resize(N - 1); for (int i = 1; i < N / 2; i++) { X[i - 1] = -(i * 2); Y[i - 1] = -(i * 2 + 1); } for (int i = N / 2; i <= N - 1; i++) { ll x = i - N / 2; ll e = 0; for (int j = 1; j < N / 2; j *= 2) { e *= 2; e += (x & 1); x /= 2; } // cout << i - N / 2 << ' ' << e << '\n'; X[i - 1] = A[e]; Y[i - 1] = A[e + N / 2]; } // for (int i = 0; i < X.size(); i++) { // cout << X[i] << ' ' << Y[i] << '\n'; // } if (X.size() > NN * 2) { exit(-1); // C[0] = 0; } answer(C, X, Y); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 348 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 0 ms | 348 KB | Output is partially correct |
2 | Partially correct | 40 ms | 8868 KB | Output is partially correct |
3 | Partially correct | 66 ms | 9040 KB | Output is partially correct |
4 | Partially correct | 45 ms | 9800 KB | Output is partially correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Partially correct | 0 ms | 348 KB | Output is partially correct |
2 | Partially correct | 40 ms | 8868 KB | Output is partially correct |
3 | Partially correct | 66 ms | 9040 KB | Output is partially correct |
4 | Partially correct | 45 ms | 9800 KB | Output is partially correct |
5 | Partially correct | 47 ms | 10308 KB | Output is partially correct |
6 | Partially correct | 57 ms | 10088 KB | Output is partially correct |
7 | Partially correct | 86 ms | 10084 KB | Output is partially correct |
8 | Partially correct | 77 ms | 9792 KB | Output is partially correct |
9 | Partially correct | 48 ms | 9048 KB | Output is partially correct |
10 | Partially correct | 49 ms | 9792 KB | Output is partially correct |
11 | Partially correct | 48 ms | 9796 KB | Output is partially correct |
12 | Partially correct | 41 ms | 9036 KB | Output is partially correct |
13 | Partially correct | 43 ms | 9044 KB | Output is partially correct |
14 | Partially correct | 42 ms | 9304 KB | Output is partially correct |
15 | Partially correct | 45 ms | 9300 KB | Output is partially correct |
16 | Partially correct | 2 ms | 860 KB | Output is partially correct |
17 | Correct | 24 ms | 6228 KB | Output is correct |
18 | Partially correct | 41 ms | 9044 KB | Output is partially correct |
19 | Partially correct | 50 ms | 9000 KB | Output is partially correct |
20 | Partially correct | 47 ms | 9800 KB | Output is partially correct |
21 | Partially correct | 44 ms | 9804 KB | Output is partially correct |
22 | Partially correct | 51 ms | 9892 KB | Output is partially correct |