# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
553228 | sandry24 | 콤보 (IOI18_combo) | C++17 | 0 ms | 0 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 <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define pb push_back
#define mp make_pair
#define f first
#define s second
int press(std::string p);
string guess_string(int n){
string temp = "";
while(temp.size() != n){
int gotten_points = 0;
if(temp[0] != 'A' && !gotten_points){
string temp2 = temp + "A";
if(press(temp2) == temp2.size()){
temp = temp2;
gotten_points = 1;
}
}
if(temp[0] != 'B' && !gotten_points){
string temp2 = temp + "B";
if(press(temp2) == temp2.size()){
temp = temp2;
gotten_points = 1;
}
}
if(temp[0] != 'X' && !gotten_points){
string temp2 = temp + "X";
if(press(temp2) == temp2.size()){
temp = temp2;
gotten_points = 1;
}
}
if(temp[0] != 'Y' && !gotten_points){
string temp2 = temp + "Y";
if(press(temp2) == temp2.size()){
temp = temp2;
gotten_points = 1;
}
}
}
return temp;
}