# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
841512 | 2023-09-01T16:03:08 Z | Elvin_Fritl | Xoractive (IZhO19_xoractive) | C++17 | 4 ms | 464 KB |
#include <bits/stdc++.h> using namespace std; #include "interactive.h" vector<int> guess(int n) { int eded = ask(1); map<int,int>mm; for(int mask=0;mask<7;mask++) { vector<int>v; for(int i=2;i<=n;i++) { if(i&(1<<mask)){ v.push_back(i); } } if(v.size() == 0) { continue; } vector<int> fi = get_pairwise_xor(v); v.push_back(1); vector<int> se = get_pairwise_xor(v); map<int,int> m; for(int i:fi) { m[i]--; } for(int i:se) { m[i]++; } vector<int>res; for(int i=0;i<se.size();i++){ if(m[se[i]] > 0){ mm[se[i]^eded] |= (1<<mask); } } } vector<int>res(n); res[0] = eded; for(auto [x,i]:mm){ assert(i > 0); res[i-1] = x; } return res; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 208 KB | Output is correct |
2 | Correct | 0 ms | 208 KB | Output is correct |
3 | Correct | 0 ms | 208 KB | Output is correct |
4 | Correct | 1 ms | 208 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 336 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 3 ms | 360 KB | Output is correct |
4 | Correct | 3 ms | 336 KB | Output is correct |
5 | Correct | 3 ms | 336 KB | Output is correct |
6 | Correct | 3 ms | 336 KB | Output is correct |
7 | Correct | 3 ms | 360 KB | Output is correct |
8 | Correct | 3 ms | 336 KB | Output is correct |
9 | Correct | 4 ms | 336 KB | Output is correct |
10 | Correct | 3 ms | 336 KB | Output is correct |
11 | Correct | 2 ms | 336 KB | Output is correct |
12 | Correct | 3 ms | 336 KB | Output is correct |
13 | Correct | 3 ms | 336 KB | Output is correct |
14 | Correct | 3 ms | 336 KB | Output is correct |
15 | Correct | 2 ms | 336 KB | Output is correct |
16 | Correct | 3 ms | 396 KB | Output is correct |
17 | Correct | 3 ms | 336 KB | Output is correct |
18 | Correct | 3 ms | 380 KB | Output is correct |
19 | Correct | 2 ms | 336 KB | Output is correct |
20 | Correct | 3 ms | 336 KB | Output is correct |
21 | Correct | 4 ms | 336 KB | Output is correct |
22 | Correct | 3 ms | 336 KB | Output is correct |
23 | Correct | 2 ms | 336 KB | Output is correct |
24 | Correct | 4 ms | 336 KB | Output is correct |
25 | Correct | 3 ms | 336 KB | Output is correct |
26 | Correct | 3 ms | 336 KB | Output is correct |
27 | Runtime error | 3 ms | 464 KB | Execution killed with signal 11 |
28 | Halted | 0 ms | 0 KB | - |