제출 #345506

#제출 시각아이디문제언어결과실행 시간메모리
345506koketsuXoractive (IZhO19_xoractive)C++14
컴파일 에러
0 ms0 KiB
#include "interactive.h" #include <iostream> #include <set> #include <map> #define LL long long #define pb push_back using namespace std; int Ans[101]; vector <int> Pos[101]; multiset <int> get(int A){ vector <int> E = get_pairwise_xor(Pos[A]); multiset <int> Q; for(int i : E){ Q.insert(i); } return Q; } vector <int> guess(int n){ int A = ask(1); Ans[true] = A; for(int i = 0; i < 7; i++){ for(int j = 2; j <= n; j++){ if(j & (1 << i)) pos[i].pb(j); } } for(int i = 0; i < 7; i++){ if(!Pos[i].size()) continue; multiset <int> A1 = get(i); pos[i].pb(1); multiset <int> A2 = get(i); //A2.erase(A2.find(0)); for(auto it : A1){ A2.erase(A2.find(it)); } for(auto it : A2){ Boo[i].pb(it ^ Ans[1]); } } map <int, int> Mp; for(int i = 0; i < 7; i++){ for(int j : Boo[i]){ Mp[j] |= j; } } for(int i = 0; i < 7; i++){ for(int j : Boo[i]){ Ans[Mp[j]] = j; } } vector <int> Dum; for(int i = 1; i <= n; i++){ Dum.pb(Ans[i]); } return Ans; }

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

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:28:30: error: 'pos' was not declared in this scope; did you mean 'Pos'?
   28 |             if(j & (1 << i)) pos[i].pb(j);
      |                              ^~~
      |                              Pos
Xoractive.cpp:34:9: error: 'pos' was not declared in this scope; did you mean 'Pos'?
   34 |         pos[i].pb(1);
      |         ^~~
      |         Pos
Xoractive.cpp:41:13: error: 'Boo' was not declared in this scope
   41 |             Boo[i].pb(it ^ Ans[1]);
      |             ^~~
Xoractive.cpp:46:21: error: 'Boo' was not declared in this scope
   46 |         for(int j : Boo[i]){
      |                     ^~~
Xoractive.cpp:51:21: error: 'Boo' was not declared in this scope
   51 |         for(int j : Boo[i]){
      |                     ^~~
Xoractive.cpp:59:12: error: could not convert 'Ans' from 'int [101]' to 'std::vector<int>'
   59 |     return Ans;
      |            ^~~
      |            |
      |            int [101]