Submission #1010124

# Submission time Handle Problem Language Result Execution time Memory
1010124 2024-06-28T10:46:51 Z giorgi_pkhaladze Xoractive (IZhO19_xoractive) C++17
0 / 100
3 ms 344 KB
#include "interactive.h"
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb  push_back
#define gcd __gcd
using namespace std;
int n,m,k,i,j;
vector<int> guess(int n) {
	vector <int> ans(n+5);
	ans[0]=ask(1);
	map<int,int> mp;
	int io=ans[0];
	for(int k=0; k<7; k++){
		vector<int> q;
		int ck=1;
		for(int i=2; i<=n; i++)if(i&(1<<k))q.pb(i),ck=0;
		if(ck)continue;
		vector<int> a=get_pairwise_xor(q); q.pb(1);
		vector<int> b=get_pairwise_xor(q); 
		map<int,int> mp1;
		for(int i : a) mp1[i]++;
		for(int i : b){
			mp1[i]--;
			if(i!=0 && mp1[i]==-1)mp[i^io]|=(1<<k);
		}
	}
	for(auto [i,j]:mp) ans[j-1]=i;
	return ans;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output is not correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 344 KB Output is not correct
2 Halted 0 ms 0 KB -