Submission #302080

#TimeUsernameProblemLanguageResultExecution timeMemory
302080MolukhyyehCombo (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; string guess_sequence(int N) { string S = ""; char p[] = {'A', 'B', 'X', 'Y'}; if(N == 3){ for(int i = 0; i<4; ++i){ S = "A"; S += p[i]; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; } } for(int i = 0; i<4; ++i){ S = "B"; S += p[i]; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; } } for(int i = 0; i<4; ++i){ S = "X"; S += p[i]; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; } } for(int i = 0; i<4; ++i){ S = "Y"; S += p[i]; for(int j = 0; j<4; ++j){ S += p[j]; if(press(S) == 3)return S; } } } return S; } //ABXY // ABX , ABY , AXY, BXY
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...