Submission #305679

# Submission time Handle Problem Language Result Execution time Memory
305679 2020-09-23T19:19:00 Z Nucleist Xoractive (IZhO19_xoractive) C++14
0 / 100
1 ms 384 KB
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> guess(int n) {
	map<int,int>ani,fri;
	int yo=ask(1);
	for (int i = 0; i <= 6; ++i)
	{
		vector<int>cur,cur1;
		fri.clear();
		for (int j = 0; j < n; ++j)
		{
			if(j&(1<<i)){
				cur.push_back(j+1);
			}
		}
		cur=get_pairwise_xor(cur);
		cur1=cur;
		cur1.push_back(1);
		cur1=get_pairwise_xor(cur1);
		for(auto it:cur)fri[it]++;
		for(auto it:cur1){
			fri[it]--;
			if(!fri[it]){
				fri.erase(it);
			}
		}
		for(auto it:fri){
			ani[it.first^yo]|=(1<<i);
		}
	}
	vector<int>ans;
	ans.resize(n);
	for(auto it:ani){
		ans[it.second]=it.first;
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 256 KB Not correct size
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 384 KB Not correct size
2 Halted 0 ms 0 KB -