Submission #1243491

#TimeUsernameProblemLanguageResultExecution timeMemory
1243491sigmaCombo (IOI18_combo)C++20
Compilation error
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; }

Compilation message (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) {
      | ^~~