Submission #1126315

#TimeUsernameProblemLanguageResultExecution timeMemory
1126315AliyyiakbarCombo (IOI18_combo)C++17
5 / 100
1 ms408 KiB
#include "bits/stdc++.h" #include "combo.h" using namespace std; string guess_sequence(int N) { string res = ""; if (press("A")) { res += "A"; } else if (press("B")) { res += "B"; } else if (press("X")) { res += "X"; } else { res += "Y"; } if (press(res+"A") == 2) { res += "A"; } else if (press(res+"B") == 2) { res += "B"; } else if (press(res+"X") == 2) { res += "X"; } else { res += "Y"; } if (press(res+"A") == 3) { res += "A"; return res; } if (press(res + "B") == 3) { res += "B"; return res; } if (press(res + "X") == 3) { res += "X"; return res; } if (press(res + "Y") == 3) { res += "Y"; return res; } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:60:1: warning: control reaches end of non-void function [-Wreturn-type]
   60 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...