Submission #239218

#TimeUsernameProblemLanguageResultExecution timeMemory
239218Dremix10Combo (IOI18_combo)C++17
30 / 100
64 ms592 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define F first #define S second #define endl '\n' #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define maxp 22 #define EPS (ld)(1e-18) #define mod (int)(1e9+7) /// x = press(string s) for query string guess_sequence(int N) { int i; string s=""; char moves[4]={'A','B','X','Y'}; for(i=0;i<N;i++){ string p=s+moves[0]; p+=s+moves[1]; int x=press(p); if(x==i){ p=s+moves[2]; x=press(p); if(x==i) s+=moves[3]; else s+=moves[2]; } else{ p=s+moves[0]; x=press(p); if(x==i) s+=moves[1]; else s+=moves[0]; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...