제출 #1133942

#제출 시각아이디문제언어결과실행 시간메모리
1133942AgageldiXoractive (IZhO19_xoractive)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "interactive.h" using namespace std; #define ll long long #define N 200005 #define pb push_back #define ff first #define ss second #define sz(s) (int)s.size() int val; vector <int> a, b, c, d, h; vector <pair<int,int> > answer; map <int,int> vis; vector <int> guess(int n) { val = ask(n); answer.pb(make_pair(y, n)); for(int i = 0; i <= 7; i++) { b.clear(); h.clear(); for(int j = 1; j < n; j++) { if((j&(1 << i))) b.pb(j); } if(!sz(b)) continue; deque <int> a1 = get_pairwise_xor(b); b.pb(n); deque <int> a2 = get_pairwise_xor(b); for(auto j : a1) { vip[j]++; } for(auto j : a2) { vip[j]--; } for(auto j : vip) { if(j.ff && j.ss) vis[j.ff ^ val] |= (1<<i); } } for(auto i : vis) { answer.pb(make_pair(i.ss,i.ff)); } sort(answer.begin(),answer.end()); for(auto i:answer) { a.pb(i.ss); } return a; }

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

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:19:29: error: 'y' was not declared in this scope
   19 |         answer.pb(make_pair(y, n));
      |                             ^
Xoractive.cpp:27:50: error: conversion from 'std::vector<int>' to non-scalar type 'std::deque<int>' requested
   27 |                 deque <int> a1 = get_pairwise_xor(b);
      |                                  ~~~~~~~~~~~~~~~~^~~
Xoractive.cpp:29:50: error: conversion from 'std::vector<int>' to non-scalar type 'std::deque<int>' requested
   29 |                 deque <int> a2 = get_pairwise_xor(b);
      |                                  ~~~~~~~~~~~~~~~~^~~
Xoractive.cpp:31:25: error: 'vip' was not declared in this scope; did you mean 'vis'?
   31 |                         vip[j]++;
      |                         ^~~
      |                         vis
Xoractive.cpp:34:25: error: 'vip' was not declared in this scope; did you mean 'vis'?
   34 |                         vip[j]--;
      |                         ^~~
      |                         vis
Xoractive.cpp:36:30: error: 'vip' was not declared in this scope; did you mean 'vis'?
   36 |                 for(auto j : vip) {
      |                              ^~~
      |                              vis