# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
138164 | ly20 | Combo (IOI18_combo) | C++17 | 2 ms | 256 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "combo.h"
#include <bits/stdc++.h>
using namespace std;
map<int,char> mp;
string guess_sequence(int N) {
string p="A";
for(int i=1;i<N;i++)p.push_back('B');
mp[0]='A';
mp[1]='B';
mp[2]='X';
mp[3]='Y';
for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
{
for(int k=0;k<4;k++)
{
if(N==3){p[0]=mp[i];p[1]=mp[j];p[2]=mp[k];}
if(N==1)p[0]=mp[i];
if(N==2){p[0]=mp[i];p[1]=mp[j];}
if(N==2 && p[0]==p[1])continue;
if(N==3 && (p[1]==p[0] || p[2]==p[0]))continue;
if(press(p)==N)return p;
}
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |