Submission #164339

#TimeUsernameProblemLanguageResultExecution timeMemory
164339aggu_01000101Combo (IOI18_combo)C++14
10 / 100
87 ms436 KiB
#include"combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int n){ string lol[] = {"A", "B", "X", "Y"}; int taken = 0; while(press(lol[taken])==0) taken++; string s = lol[taken]; for(int i = 1;i<n;i++){ for(int j = 0;j<4;j++){ if(j==taken) continue; int rn = press(s + lol[j]); if(rn==(i+1)){ s+=lol[j]; j = 5; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...