제출 #1125579

#제출 시각아이디문제언어결과실행 시간메모리
1125579Saul0906Xoractive (IZhO19_xoractive)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define pii pair<int,int> #define pll pair<ll,ll> #define fi first #define se second #define endl "\n" #define rep(a,b,c) for(ll a=b; a<c; a++) #define rep2(a,b,c,d) for(ll a=b; a<c; a+=d) #define repr(a,b,c) for(ll a=b-1; a>c-1; a--) #define repa(a,b) for(const auto &a: b) #define multicase() int t; cin>>t; while(t--) #define fastIO() ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define valid(c) cout<<(c ? "YES" : "NO")<<endl; #define valid2(c,a,b) cout<<(c ? a : b)<<endl; #define pq_min(a) priority_queue<a, vector<a>, greater<a>> #define pq_max(a) priority_queue<a> #define pb push_back #define ppb pop_back #define pf push_front #define ppf pop_front #define mid ((l+r)>>1) #define flush endl<<flush #define all(a) a.begin(), a.end() using namespace std; using namespace __gnu_pbds; using vi = vector<int>; using ll = long long; template <typename T> using vec = vector<T>; template <typename T> using ordered_set = tree<T, null_type,less<T>, rb_tree_tag,tree_order_statistics_node_update>; mt19937_64 rnd(chrono::steady_clock::now().time_since_epoch().count()); vector<int> guess(int n){ vi ans(n); int x=ask(1); map<int,int> mp; rep(i,0,6){ vi pos, ans1, ans2; rep(j,1,n){ if(i&(1<<j)){ pos.pb(i+1); } } ans1=get_pairwise_xor(pos); pos.pb(1); ans2=get_pairwise_xor(pos); multiset<int> a; repa(e,ans2) a.insert(e); repa(e,ans1) a.erase(a.find(e)); repa(e,a) mp[e]^=(1<<i); } ans[1]=x; repa(e,mp) ans[e.se]=e.fi^x; return ans; }

컴파일 시 표준 에러 (stderr) 메시지

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:40:15: error: 'ask' was not declared in this scope
   40 |         int x=ask(1);
      |               ^~~
Xoractive.cpp:49:22: error: 'get_pairwise_xor' was not declared in this scope
   49 |                 ans1=get_pairwise_xor(pos);
      |                      ^~~~~~~~~~~~~~~~