제출 #232237

#제출 시각아이디문제언어결과실행 시간메모리
232237celeste콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include "combo.h" #include <iostream> using namespace std; std::string guess_sequence(int N) { string p,s = ""; if (press("A")==1)s += "A"; elseif (press("B")==1)s += "B"; elseif (press("X")==1)s += "X"; elseif (press("Y")==1)s += "Y"; if (press(s+"A")==2)s += "A"; elseif (press("B")==2)s += "B"; elseif (press("X")==2)s += "X"; elseif (press("Y")==2)s += "Y"; if (press(s+"A")==3)s += "A"; elseif (press("B")==3)s += "B"; elseif (press("X")==3)s += "X"; elseif (press("Y")==3)s += "Y"; return s; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:3: error: 'elseif' was not declared in this scope
    8 |   elseif (press("B")==1)s += "B";
      |   ^~~~~~