이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 40005;
map <int, int> M;
vector<int> guess(int n) 
{
	vector <int> ans(n);
	ans[0] = ask(1);
	for(int i = 0; i < 7; i++)
	{
		vector <int> id;
		for(int j = 2; j <= n; j++)
		{
			if(j & (1 << i))
			{
				id.push_back(j);
			}
		}
		
		if(id.empty())
		{
			continue;
		}
		vector <int> get1, get2;
		get1 = get_pairwise_xor(id);
		id.push_back(1);
		get2 = get_pairwise_xor(id);
		map <int, int> MM;
		for(auto x : get1)
		{
			MM[x]++;
		}
		for(auto x : get2)
		{
			MM[x]--;
			if(MM[x] == -1)
			{
				if(x != 0)
				{
					M[x ^ ans[0]] |= (1 << i);
				}
			}
		}
	}
	for(auto x : M)
	{
		ans[x.second - 1] = x.first;
	}
	return ans;
}
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... | 
| # | Verdict  | Execution time | Memory | Grader output | 
|---|
| Fetching results... |