제출 #1243491

#제출 시각아이디문제언어결과실행 시간메모리
1243491sigma콤보 (IOI18_combo)C++20
컴파일 에러
0 ms0 KiB
std::string press(std::string p); std::string guess_sequence(int N) { std::string s = ""; std::string x = "abxy"; for (int i = 0; i < N; i++) { for (int j = 0; j < 4; j++) { s.push_back(x[j]); if (press(s) == i+1) break; else s.pop_back(); } } return s; }

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

combo.cpp:1:6: error: 'string' in namespace 'std' does not name a type
    1 | std::string press(std::string p);
      |      ^~~~~~
combo.cpp:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
  +++ |+#include <string>
    1 | std::string press(std::string p);
combo.cpp:3:6: error: 'string' in namespace 'std' does not name a type
    3 | std::string guess_sequence(int N) {
      |      ^~~~~~
combo.cpp:3:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
    3 | std::string guess_sequence(int N) {
      | ^~~