제출 #1143674

#제출 시각아이디문제언어결과실행 시간메모리
1143674sanoCluedo (IOI10_cluedo)C++20
컴파일 에러
0 ms0 KiB
#include "grader.h" #include "cluedo.h" #include<iostream> #include<vector> void solve() { vector<int> p(3, 1); while (1) { int x = Theory(p[0], p[1], p[2]); if (x == 0) { return; } p[x - 1]++; } return; }

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

cluedo.cpp: In function 'void solve()':
cluedo.cpp:7:9: error: 'vector' was not declared in this scope
    7 |         vector<int> p(3, 1);
      |         ^~~~~~
cluedo.cpp:7:9: note: suggested alternatives:
In file included from /usr/include/c++/11/vector:67,
                 from cluedo.cpp:4:
/usr/include/c++/11/bits/stl_vector.h:389:11: note:   'std::vector'
  389 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
In file included from cluedo.cpp:4:
/usr/include/c++/11/vector:86:13: note:   'std::pmr::vector'
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
cluedo.cpp:7:16: error: expected primary-expression before 'int'
    7 |         vector<int> p(3, 1);
      |                ^~~
cluedo.cpp:9:32: error: 'p' was not declared in this scope
    9 |                 int x = Theory(p[0], p[1], p[2]);
      |                                ^