제출 #1006796

#제출 시각아이디문제언어결과실행 시간메모리
1006796GTA콤보 (IOI18_combo)C++17
컴파일 에러
0 ms0 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { n = N; vector<char> v(4) = {'A', 'B', 'X', 'Y'}; fr(i, 0, 3) { fr(j, 0, 3) { fr(l, 0, 3) { string p = v[i] + v[j] + v[l]; x = press(p); if (x == 3) { return p; } } } } return S; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:4:3: error: 'n' was not declared in this scope
    4 |   n = N;
      |   ^
combo.cpp:5:3: error: 'vector' was not declared in this scope
    5 |   vector<char> v(4) = {'A', 'B', 'X', 'Y'};
      |   ^~~~~~
combo.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
    1 | #include "combo.h"
  +++ |+#include <vector>
    2 | using namespace std;
combo.cpp:5:10: error: expected primary-expression before 'char'
    5 |   vector<char> v(4) = {'A', 'B', 'X', 'Y'};
      |          ^~~~
combo.cpp:6:6: error: 'i' was not declared in this scope
    6 |   fr(i, 0, 3) {
      |      ^
combo.cpp:6:3: error: 'fr' was not declared in this scope
    6 |   fr(i, 0, 3) {
      |   ^~
combo.cpp:17:10: error: 'S' was not declared in this scope
   17 |   return S;
      |          ^