Submission #521916

# Submission time Handle Problem Language Result Execution time Memory
521916 2022-02-03T12:45:10 Z dostigator Xoractive (IZhO19_xoractive) C++17
0 / 100
0 ms 200 KB
#include "interactive.h"
#include <bits/stdc++.h>
using namespace std;

vector<int> guess(int n) {
	vector <int> ans(n+2);
	int base=ask(1);
	ans[1]=base;
	map<int,int>res;
	for(int i=0; i<7; ++i){
        vector<int>v;
        for(int x=1; x<=n; ++x) if((x>>i)&1) v.push_back(x);
        vector<int>get=get_pairwise_xor(v);
        v.push_back(1);
        vector<int>GET=get_pairwise_xor(v);
        map<int,int>mp;
        for(int x:get) mp[x]++;
        for(int x:GET){
            if(mp[x]==0) res[x^base]|=(1<<i);
            mp[x]--;
        }
	}
	for(auto [x,y]:res){
        ans[y]=x;
	}
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB Not unique
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 200 KB Not unique
2 Halted 0 ms 0 KB -