Submission #339975

#TimeUsernameProblemLanguageResultExecution timeMemory
339975fixikmilaXoractive (IZhO19_xoractive)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include"interactive.h" using namespace std; #define MOD 1000000007 typedef long long ll; typedef pair<ll,ll>pll; typedef long double ld; ll bin_pow(ll a,ll b){ if(b==0)return 1; if(b%2==0){ ll t=bin_pow(a,b/2); return t*t%MOD; } else return a*bin_pow(a,b-1)%MOD; } vector<int>guess(int n){ vector<int>a(n); int x=__lg(n-1); a[0]=ask(1); map<ll,ll>mp; for(int j=0;j<=x;j++){ vector<ll>c; for(int i=1;i<n;i++){ if((i>>j)&1){ c.push_back(i+1); } } vector<int>d=get_pairwise_xor(c); map<ll,ll>mp1,mp2; for(auto u : d)mp1[u]++; d.clear(); for(auto u : mp1){ if(u.first){ for(int i=0;i<u.second;i++)d.push_back(u.first); } } for(auto u : d){ mp[u]-=(1<<j); } c.push_back(1); d=get_pairwise_xor(c); for(auto u : d)mp2[u]++; d.clear(); for(auto u : mp2){ if(u.first){ for(int i=0;i<u.second;i++)d.push_back(u.first); } } for(auto u : d){ mp[u]+=(1<<j); } } for(auto u : mp)a[u.first]=u.second^a[0]; return a; }

Compilation message (stderr)

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:28:39: error: could not convert 'c' from 'vector<long long int>' to 'vector<int>'
   28 |         vector<int>d=get_pairwise_xor(c);
      |                                       ^
      |                                       |
      |                                       vector<long long int>
Xoractive.cpp:41:28: error: could not convert 'c' from 'vector<long long int>' to 'vector<int>'
   41 |         d=get_pairwise_xor(c);
      |                            ^
      |                            |
      |                            vector<long long int>