제출 #866053

#제출 시각아이디문제언어결과실행 시간메모리
866053ElenaBMCluedo (IOI10_cluedo)C++17
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include <bits/stdc++.h> using namespace std; vector<int>a, b, c; void Solve (){ a.clear(); b.clear(); c.clear(); for (int i = 1; i <= 6; ++i){ a.push_back(i); c.push_back(i); } for (int i = 1; i <= 10; ++i)b.push_back(i); int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]); while (x != 0){ if (x == 1) a.pop_back(); if (x== 2) b.pop_back(); else c.pop_back(); x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]); } }

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

cluedo.cpp: In function 'void Solve()':
cluedo.cpp:16:80: error: expected ']' before ')' token
   16 |     int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                ^
      |                                                                                ]
cluedo.cpp:16:81: error: expected ',' or ';' before ']' token
   16 |     int x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                 ^
cluedo.cpp:21:80: error: expected ']' before ')' token
   21 |         x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                ^
      |                                                                                ]
cluedo.cpp:21:81: error: expected ';' before ']' token
   21 |         x = Theory (a[(int)a.size() - 1], b[(int)b.size()-1], c[(int)c.size()-1)]);
      |                                                                                 ^
      |                                                                                 ;