Submission #890723

#TimeUsernameProblemLanguageResultExecution timeMemory
890723kokoueCombo (IOI18_combo)C++14
0 / 100
0 ms344 KiB
#include<bits/stdc++.h> #include "combo.h" std::string guess_sequence(int N) { std::string p = ""; std::string S = ""; p="AX"; std::string let; int bid; int coins=press(p); if(coins>=1) { p="A"; coins=press(p); if(coins==1) {S+="A";let="XBY";} else {S+="X";let="ABY";} } else { p="B"; coins=press(p); if(coins==1) {S+="B";let="AXY";} else {S+="Y";let="AXB";} } for(int i=1;i<N-1;i++) { p=""; p=S+let[0]; p+=S+let[1]+let[0]; p+=S+let[1]+let[1]; p+=S+let[1]+let[2]; coins=press(p); if(coins==1+i) S+=let[0]; if(coins==3+i) S+=let[1]; if(coins==0+i) S+=let[2]; } p=S+let[0]; p+=S+let[1]; coins=press(p); if(coins==0+N-1) S+=let[2]; else { p=S+let[0]; coins=press(p); if(coins==0+N-1) S+=let[1]; if(coins==1+N-1) S+=let[0]; } return S; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:7: warning: unused variable 'bid' [-Wunused-variable]
    9 |   int bid;
      |       ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...