Submission #305336

#TimeUsernameProblemLanguageResultExecution timeMemory
305336daveeedCombo (IOI18_combo)C++17
30 / 100
59 ms576 KiB
#include "combo.h" char terms[4] = {'A', 'B', 'X', 'Y'}; std::string guess_sequence(int N) { std::string p = ""; std::string answer = ""; int s = -1; for(int i = 0; i < N; i++){ p = answer + terms[0] + answer + terms[1]; if(press(p) > i){ if(s == 0){ answer += terms[1]; continue; } if(s == 1){ answer += terms[0]; continue; } p = answer + terms[0]; if(press(p) > i){ answer += terms[0]; if(i == 0) s = 0; } else{ answer += terms[1]; if(i == 0) s = 1; } } else{ if(s == 2){ answer += terms[3]; continue; } if(s == 3){ answer += terms[2]; continue; } p = answer + terms[2]; if(press(p) > i){ answer += terms[2]; if(i == 0) s = 2; } else{ answer += terms[3]; if(i == 0) s == 3; } } } return answer; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:50:23: warning: statement has no effect [-Wunused-value]
   50 |                     s == 3;
      |                     ~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...