Submission #1139201

#TimeUsernameProblemLanguageResultExecution timeMemory
1139201AHOKAXoractive (IZhO19_xoractive)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> //#include "interactive.h" using namespace std; #define threesum cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false) #define all(a) a.begin(), a.end() #define F first #define S second //#define int long long #define double long double #define pii pair<int, int> #define ppp pair<int, pii> #define dout cout << fixed << setprecision(15) #define mid ((l + r) / 2) #define lc (2 * id) #define rc (lc + 1) //const int maxn = 3e5 + 10, maxm = 1e3 + 10, oo = 1e18 + 10, lg = 8, sq = 350, mod = 1e9 + 7; vector<int> guess(int n){ vector<int> a(n); a[0] = ask(1); map<int, int> mp; for (int b = 0; b < 7;b++){ vector<int> u, v, f; for (int i = 2; i <= n; i++) if(i & (1ll << b)) v.push_back(i); if(!v.size()) continue; u = get_pairwise_xor(v); v.push_back(1); f = get_pairwise_xor(v); multiset<int> s; for(auto i : f) s.insert(i); for(auto i : u) s.erase(s.find(i)); for(auto j : s) cnt[j ^ a[1]] |= (1ll << b); } vector<pii> vp; for(auto [x, msk] : mp) vp.push_back({msk, x}); set<int> used; used.insert(a[1]); sort(all(vp)); reverse(all(vp)); for(auto [msk, x] : vp) if(used.find(x) == used.end()){ a[msk - 1] = x; used.insert(x); } return a; }

Compilation message (stderr)

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:24:16: error: 'ask' was not declared in this scope
   24 |         a[0] = ask(1);
      |                ^~~
Xoractive.cpp:38:21: error: 'get_pairwise_xor' was not declared in this scope
   38 |                 u = get_pairwise_xor(v);
      |                     ^~~~~~~~~~~~~~~~
Xoractive.cpp:53:25: error: 'cnt' was not declared in this scope; did you mean 'int'?
   53 |                         cnt[j ^ a[1]] |= (1ll << b);
      |                         ^~~
      |                         int