# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
841514 | 2023-09-01T16:04:20 Z | Elvin_Fritl | Xoractive (IZhO19_xoractive) | C++17 | 4 ms | 648 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+1); res[0] = eded; for(auto [x,i]:mm){ assert(i > 0 && i <= n); res[i-1] = x; } return res; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 1 ms | 336 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 4 ms | 648 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |