Submission #173351

# Submission time Handle Problem Language Result Execution time Memory
173351 2020-01-03T19:05:45 Z Abelyan Xoractive (IZhO19_xoractive) C++17
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include <interactive.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;

#define FOR(i,a) for (int i=0;i<(a);++i)
#define FORD(i,a) for (int i=(a)-1;i>=0;i--)
#define FORT(i,a,b) for (int i=(a);i<=(b);++i)
#define FORTD(i,b,a) for (int i=(b);i>=(a);--i)
#define trav(i,v) for (auto i : v)
#define all(v) v.begin(),v.end()
#define ad push_back
#define fr first
#define sc second
#define mpr(a,b) make_pair(a,b)
#define pir pair<int,int>
#define make_unique(v) v.erase(unique(all(v)),v.end())
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define srng mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
#define y1 EsiHancagorcRepa



vector<int> guess(int n){
	vector<int> ans(n);
	ans[0]=ask(1);
	FOR(i,7){
		vector<int> tv;
		FORT(j,1,n-1){
			if ((1<<i)&j){
				tv.ad(j+1);
			}
		}
		vector<int> gt=get_pairwise_xor(tv);
		trav(k,gt){
			qan[k]-=(1<<i);
		}
		qan[0]-=(1<<i);
		tv.ad(1);
		gt=get_pairwise_xor(tv);
		trav(k,gt){
			qan[k]+=(1<<i);
		}
	}
	trav(tv,qan){
		if (tv.sc==0)continue;
		ans[tv.sc]=tv.fr;
	}
	return ans;
}

Compilation message

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:39:4: error: 'qan' was not declared in this scope
    qan[k]-=(1<<i);
    ^~~
Xoractive.cpp:39:4: note: suggested alternative: 'tan'
    qan[k]-=(1<<i);
    ^~~
    tan
Xoractive.cpp:41:3: error: 'qan' was not declared in this scope
   qan[0]-=(1<<i);
   ^~~
Xoractive.cpp:41:3: note: suggested alternative: 'tan'
   qan[0]-=(1<<i);
   ^~~
   tan
Xoractive.cpp:48:10: error: 'qan' was not declared in this scope
  trav(tv,qan){
          ^
Xoractive.cpp:13:33: note: in definition of macro 'trav'
 #define trav(i,v) for (auto i : v)
                                 ^
Xoractive.cpp:48:10: note: suggested alternative: 'tan'
  trav(tv,qan){
          ^
Xoractive.cpp:13:33: note: in definition of macro 'trav'
 #define trav(i,v) for (auto i : v)
                                 ^