Submission #933356

#TimeUsernameProblemLanguageResultExecution timeMemory
933356Aria_lix19Combo (IOI18_combo)C++14
0 / 100
0 ms344 KiB
#include<bits/stdc++.h> int press(std::string p); std::string guess_sequence(int N) { std::string p = "AB"; char a, b, c; long long ruzz; // for (int i = 0; i < 4 * N; ++i) { // p += 'A'; // } std::string s = ""; // for (int i = 0; i < N; ++i) { // S += 'A'; // } // return S; if(press(p) ==0){ p='X'; if(press(p)==0){ s+='Y'; a='A'; b='B'; c='X'; } else{ s+='X'; a='A'; b='B'; c='Y'; } } else{ p='A'; if(press(p)==0){ s+='B'; a='A'; b='X'; c='Y'; } else{ s+='A'; a='B'; b='X'; c='Y'; } } for(int i = 1; i <N-1; i++){ p=s+a+s+b+a+s+b+b+s+b+c; ruzz=s.size(); int coin =press(p); if(coin==ruzz){ s+=c; } else if(coin==ruzz+1){ s+=a; } else s+=b; } p=s+a+s+b; ruzz=s.size(); if(press(p)==ruzz+1){ p=s+a; if(press(p)==1) s+=a; else s+=b; } else s+=c; return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...