제출 #1130298

#제출 시각아이디문제언어결과실행 시간메모리
1130298sohamsen15Cluedo (IOI10_cluedo)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "cluedo.h" void Solve() { vector<int> a(6, 0); vector<int> b(10, 0); vector<int> c(6, 0); for (int i = 0; i < 6; i++) for (int j = 0; j < 10; j++) for (int k = 0; k < 6; k++) { if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue; int r = Theory(i + 1, j + 1, k + 1); if (r == 0) return; else if (r == 1) a[i] = 1; else if (r == 2) b[j] = 1; else c[k] = 1; } }

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

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:5:5: error: 'vector' was not declared in this scope
    5 |     vector<int> a(6, 0);
      |     ^~~~~~
cluedo.cpp:5:12: error: expected primary-expression before 'int'
    5 |     vector<int> a(6, 0);
      |            ^~~
cluedo.cpp:6:12: error: expected primary-expression before 'int'
    6 |     vector<int> b(10, 0);
      |            ^~~
cluedo.cpp:7:12: error: expected primary-expression before 'int'
    7 |     vector<int> c(6, 0);
      |            ^~~
cluedo.cpp:11:21: error: 'a' was not declared in this scope
   11 |                 if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue;
      |                     ^
cluedo.cpp:11:34: error: 'b' was not declared in this scope
   11 |                 if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue;
      |                                  ^
cluedo.cpp:11:47: error: 'c' was not declared in this scope
   11 |                 if (a[i] == 1 || b[j] == 1 || c[i] == 1) continue;
      |                                               ^
cluedo.cpp:14:34: error: 'a' was not declared in this scope
   14 |                 else if (r == 1) a[i] = 1;
      |                                  ^
cluedo.cpp:15:34: error: 'b' was not declared in this scope
   15 |                 else if (r == 2) b[j] = 1;
      |                                  ^
cluedo.cpp:16:22: error: 'c' was not declared in this scope
   16 |                 else c[k] = 1;
      |                      ^