# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
161934 | Alexa2001 | Xoractive (IZhO19_xoractive) | C++17 | 17 ms | 400 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> guess(int n)
{
vector<int> ans(n), q, ans1, ans2;
map<int, int> mp;
int last = ask(n);
ans[n-1] = last;
int i, j;
for(i=0; i<7; ++i)
{
q.clear();
for(j=1; j<n; ++j)
if(j & (1<<i)) q.push_back(j);
if(q.size())
ans1 = get_pairwise_xor(q);
else ans1.clear();
q.push_back(n);
ans2 = get_pairwise_xor(q);
map<int,int> now;
for(auto it : ans1) --now[it];
for(auto it : ans2) ++now[it];
for(auto it : now)
if(it.first && it.second)
mp[it.first ^ last] |= (1<<i);
}
for(auto it : mp)
ans[it.second - 1] = it.first;
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |