# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
370955 | casperwang | Xoractive (IZhO19_xoractive) | C++14 | 3 ms | 512 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
#define pb push_back
using namespace std;
#define debug(args...) kout("[ " + string(#args) + " ]", args)
void kout() { cerr << endl; }
template <class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ',kout(b...); }
template <class T> void pary(T L, T R) { while (L != R) cerr << *L << " \n"[++L==R]; }
const int MAXN = 100;
int n;
vector <int> ans;
map <int,int> pos;
vector<int> guess(int N) {
ans.clear(), ans.resize(N);
ans[0] = ask(1);
for (int i = 0; (1<<i) < N; i++) {
vector <int> G;
for (int j = 1; j <= N-1; j++)
if (j & (1<<i)) G.pb(j+1);
vector <int> exp = get_pairwise_xor(G);
G.pb(1);
vector <int> all = get_pairwise_xor(G);
int j = 0;
for (int k = 0; k < exp.size(); k++, j++)
while (all[j] != exp[k])
pos[all[j++] ^ ans[0]] |= (1<<i);
while (j < all.size())
pos[all[j++] ^ ans[0]] |= (1<<i);
}
for (auto [v, p] : pos)
if (v != ans[0])
ans[p] = v;
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |