제출 #1170285

#제출 시각아이디문제언어결과실행 시간메모리
1170285moha1111Combo (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
#include "bits/stdc++.h" #include "combo.h#include "bits/stdc++.h" #include "combo.h" using namespace std; string guess_sequence(int N) { string s = ""; int con = 0; while(con < min(4 * N , 8000)) { if(press(s + "A") == s.size() + 1) s += "A"; else if(press(s + "B") == s.size() + 1) s += "B"; else if(press(s + "X") == s.size() + 1) s += "X"; else s += "Y"; con++; } return s; } using namespace std; string guess_sequence(int N) { string s = ""; while(s.size() < min(4 * N , 8000)) { if(press(s + "A") == s.size() + 1) s += "A"; else if(press(s + "B") == s.size() + 1) s += "B"; else if(press(s + "X") == s.size() + 1) s += "X"; else s += "Y"; } return s; }

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

combo.cpp:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include "combo.h#include "bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
combo.cpp:2:41: warning: missing terminating " character
    2 | #include "combo.h#include "bits/stdc++.h"
      |                                         ^
combo.cpp:31:8: error: redefinition of 'std::string guess_sequence(int)'
   31 | string guess_sequence(int N)
      |        ^~~~~~~~~~~~~~
combo.cpp:6:8: note: 'std::string guess_sequence(int)' previously defined here
    6 | string guess_sequence(int N)
      |        ^~~~~~~~~~~~~~