# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
208355 | MetB | Xoractive (IZhO19_xoractive) | C++14 | 42 ms | 504 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
vector <int> guess (int n) {
map <int, int> ind;
int d = ask (1);
for (int b = 0; b < 7; b++) {
vector <int> v;
for (int i = 0; i < n; i++) {
if (i & (1 << b)) v.push_back (i + 1);
}
if (v.empty ()) break;
vector <int> ans = get_pairwise_xor (v);
v.push_back (1);
vector <int> ans2 = get_pairwise_xor (v);
for (int a : ans)
ans2.erase (find (ans2.begin (), ans2.end (), a));
sort (ans2.begin(), ans2.end());
for (int i = 1; i < ans2.size (); i += 2) {
ind[ans2[i] ^ d] |= (1 << b);
}
}
vector <int> ans (n);
ans[0] = d;
for (auto x : ind) {
ans[x.second] = x.first;
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |