Submission #1131149

#TimeUsernameProblemLanguageResultExecution timeMemory
1131149TsaganaXoractive (IZhO19_xoractive)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>

#define all(x) x.begin(), x.end()
#define int long long
#define pq priority_queue
#define eb emplace_back
#define lb lower_bound
#define ub upper_bound
#define pb push_back
#define pp pop_back
#define F first
#define S second
#include "interactive.h"

using namespace std;

vector<int> guess (int n) {
	vector<int> a(n);
	a[0] = ask(1);
	map<int, int> ans;
	for (int i = 0; (1 << i) <= n; i++) {
		vector<int> p;
		for (int j = 2; j <= n; j++) if (j & (1 << i)) p.pb(j);
		auto g1 = get_pairwise_xor(p); p.pb(1);
		auto g2 = get_pairwise_xor(p);

		map<int, int> mp;
		for (auto x: g2) mp[x]++;
		for (auto x: g1) mp[x]--;
		for (auto x: mp) if (x.S) ans[x.F ^ a[0]] |= (1 << i);
	}
	for (auto x: ans) a[x.S - 1] = x.F;
	return a;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/ccUyYcI3.o: in function `guess(long long)':
Xoractive.cpp:(.text+0x347): undefined reference to `ask(long long)'
/usr/bin/ld: Xoractive.cpp:(.text+0x4ea): undefined reference to `get_pairwise_xor(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: Xoractive.cpp:(.text+0x5d5): undefined reference to `get_pairwise_xor(std::vector<long long, std::allocator<long long> >)'
/usr/bin/ld: /tmp/ccdW4fy4.o: in function `main':
grader.cpp:(.text.startup+0xe4): undefined reference to `guess(int)'
collect2: error: ld returned 1 exit status