제출 #1283405

#제출 시각아이디문제언어결과실행 시간메모리
1283405muhammad-mutahir콤보 (IOI18_combo)C++20
30 / 100
15 ms448 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; // ABXYY // int press(string k){ // cout<<k<<endl; // int t; // cin>>t; // return t; // } string guess_sequence(int N) { int n , m , k , q; string cr = ""; k = press("A"); if(k){ cr+="A"; } else{ k = press("B"); if(k){ cr+="B"; }else{ k = press("X"); if(k){ cr+="X"; } else{ cr+="Y"; } } } string f = cr; vector<string>pos = {"A","B","X","Y"}; vector<string>rem; for(auto i:pos){ if(i != cr)rem.push_back(i); } int cl = 1; for(int i = 1;i<N;i++){ int k = press(cr+rem[0]); if(k == cl+1){ cr+=rem[0]; } else{ k = press(cr+rem[1]); if(k == cl+1){ cr+=rem[1]; } else{ cr+=rem[2]; } } cl++; } return cr; // cr+s+f + cr+t+s+f + cr+t+t+f + cr+t+fo // for(int i = 1;i<N-1;i++){ // int k = press(cr+rem[0] + cr+rem[1]+rem[0] + cr+rem[1]+rem[1] + cr+rem[1]+rem[2]); // // if(k == cl){ // cr+=rem[2]; // } // else if(k == cl+1){ // cr+=rem[0]; // } // else{ // cr+=rem[1]; // } // cl++; // // } // k = press(cr+rem[0]); // if(k == n){ // cr+=rem[0]; // } // else{ // k = press(cr+rem[1]); // if(k == n){ // cr+=rem[1]; // } // else{ // cr+=rem[2]; // } // } // return cr; } // // signed main(){ // ios::sync_with_stdio(0);//DO NOT USE IN INTERACTIVE // cin.tie(0), cout.tie(0); // cout << fixed<<setprecision(9); // string s = guess_sequence(5); // cout<<"ans :"<<s<<endl; // } //
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...