제출 #48066

#제출 시각아이디문제언어결과실행 시간메모리
48066kawaiigrabrielneko도서관 (JOI18_library)C++14
컴파일 에러
0 ms0 KiB
#include <cstdio> #include <vector> //#include "library.h" using namespace std; vector<int> al[209]; void Solve(int N){ vector<int> M(N); for (int i = 0; i < N; i++){ for (int j = 0; j < i; j++){ M[i] = 1; M[j] = 1; if (Query(M)==1){ al[i].push_back(j); al[j].push_back(i); } M[i] = 0; M[j] = 0; } } int ed = 0; while (al[ed].size()==2) ed++; vector<int> ans(N); ans[0] = ed; if (N>1) ans[1] = al[ed][0]; for (int i = 2; i < N; i++){ if (al[ans[i-1]][0]==ans[i-2]) ans[i] = al[ans[i-1]][1]; else ans[i] = al[ans[i-1]][0]; } for (int i = 0; i < N; i++){ ans[i]++; } Answer(ans); }

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

library.cpp: In function 'void Solve(int)':
library.cpp:14:17: error: 'Query' was not declared in this scope
             if (Query(M)==1){
                 ^~~~~
library.cpp:34:2: error: 'Answer' was not declared in this scope
  Answer(ans);
  ^~~~~~