제출 #1167543

#제출 시각아이디문제언어결과실행 시간메모리
1167543sleepntsheep카멜레온의 사랑 (JOI20_chameleon)C++20
컴파일 에러
0 ms0 KiB
#include <vector> namespace { int variable_example = 1; } // namespace void Solve(int N) { int x[55][55]; for (int i = 1; i <= N; ++i) for (int j = i + 1; j <= N; ++j) x[i][j] = x[j][i] = Query(std::vector<int>{i, j}); for (int i = 1; i <= N; ++i) { for (int c = 1; c <= N; ++c) { if (c == i || Query(std::vector<int>{c, i}) > 1) continue; int ok = 1; for (int k = 1; k <= N; ++k) if (k != i && c != k && Query(std::vector<int>{i, c, k}) != x[i][k]) ok=0; if(ok) { Answer(i, c); goto X; } } X:; } }

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

chameleon.cpp: In function 'void Solve(int)':
chameleon.cpp:13:45: error: 'Query' was not declared in this scope
   13 |                         x[i][j] = x[j][i] = Query(std::vector<int>{i, j});
      |                                             ^~~~~
chameleon.cpp:17:39: error: 'Query' was not declared in this scope
   17 |                         if (c == i || Query(std::vector<int>{c, i}) > 1)
      |                                       ^~~~~
chameleon.cpp:23:44: error: 'Query' was not declared in this scope
   23 |                                         && Query(std::vector<int>{i, c, k}) != x[i][k])
      |                                            ^~~~~
chameleon.cpp:26:33: error: 'Answer' was not declared in this scope
   26 |                                 Answer(i, c);
      |                                 ^~~~~~