Submission #914984

#TimeUsernameProblemLanguageResultExecution timeMemory
914984shenfe1Xoractive (IZhO19_xoractive)C++17
0 / 100
4 ms344 KiB
#include <bits/stdc++.h> #include "interactive.h" #pragma GCC optimize("03") #pragma GCC optimize("Ofast") #pragma GCC target("avx2") using namespace std; #define ll long long #define ld long double #define pb push_back #define pf push_front #define pii pair<int,int> #define all(v) v.begin(),v.end() #define F first #define S second #define mem(a,i) memset(a,i,sizeof(a)) #define sz(s) (int)s.size() #define y1 yy #define ppb pop_back #define lb lower_bound #define ub upper_bound #define gcd(a,b) __gcd(a,b) #define in insert const int MAX=3e5+15; const int B=2e5; const int N=104; const int block=450; const int maxB=MAX/B+10; const ll inf=1e18; const int mod=1e9+7; const int mod1=1e9+9; const ld eps=1e-9; int dx[8]={1,0,-1,0,1,-1,-1,1}; int dy[8]={0,1,0,-1,1,-1,1,-1}; int a[MAX]; map<int,int> mp; vector<int> guess(int n){ vector<int> ans; a[1]=ask(1); for(int i=0;i<7;i++){ vector<int> ask,ask1; for(int j=1;j<=n;j++){ if((j>>i)&1){ if(j!=1){ ask.pb(j); ask1.pb(j); } } } ask1.pb(1); vector<int> v=get_pairwise_xor(ask); vector<int> v1=get_pairwise_xor(ask1); multiset<int> st; for(int x:v1)st.in(x); for(int x:v){ st.erase(st.find(x)); } st.erase(st.find(0)); for(int x:st){ mp[(x^a[1])]+=(1<<i); } } for(pii x:mp){ a[x.S]=x.F; } for(int i=1;i<=n;i++)ans.pb(a[i]); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...