Submission #1010019

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10100192024-06-28 09:16:05giorgi_pkhaladzeXoractive (IZhO19_xoractive)C++14
0 / 100
0 ms344 KiB
#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(k=0; k<7; k++){
vector<int> q;
map<int,int> mp1;
vector<int> a,b,c;
for(int i=1; i<=n; i++)if(i&(1<<k))q.pb(i);
if(q.size()==0)continue;
a=get_pairwise_xor(q); q.pb(1);
b=get_pairwise_xor(q);
for(int i : a) mp1[i]++;
for(int i : b){
mp1[i]--;
if(i!=0 && mp1[i]<0)mp[i^io]+=(1<<k);
}
}
for(auto [i,j] : mp)ans[j-1]=i;
return ans;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:29:11: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
   29 |  for(auto [i,j] : mp)ans[j-1]=i;
      |           ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...