Submission #963922

# Submission time Handle Problem Language Result Execution time Memory
963922 2024-04-16T03:32:25 Z Mardonbekhazratov Combo (IOI18_combo) C++17
0 / 100
1 ms 500 KB
#include "combo.h"

using namespace std;

string guess_sequence(int N) {
  string p = "";
  int c=0;
  while(true){
    if(press(p+"A")==c+1) p+="A";
    else if(press(p+"B")==c+1) p+="B";
    else if(press(p+"X")==c+1) p+="X";
    else if(press(p+"Y")==c+1) p+"Y";
    else break;
    c++;
  }
  while(c!=N){
    if(press(p+"A")==c+1) p+="A";
    else if(press(p+"B")==c+1) p+="B";
    else if(press(p+"X")==c+1) p+="X";
    else p+="Y";
    c++;
  }
  return p;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Incorrect 1 ms 344 KB Wrong Answer: wrong guess.
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 344 KB Output is partially correct
2 Partially correct 0 ms 344 KB Output is partially correct
3 Partially correct 1 ms 344 KB Output is partially correct
4 Incorrect 0 ms 500 KB Wrong Answer: wrong guess.
5 Halted 0 ms 0 KB -