| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 900135 | Omar_Elgedawy | 콤보 (IOI18_combo) | C++17 | 1 ms | 380 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;
mt19937 mt(time(nullptr));
string guess_sequence(int n) {
vector<char> chr(3);
string cur;
if (press("A"))chr = {'B', 'X', 'Y'}, cur = "A";
else if (press("B"))chr = {'A', 'X', 'Y'}, cur = "B";
else if (press("X"))chr = {'A', 'B', 'Y'}, cur = "X";
else chr = {'A', 'X', 'B'}, cur = "Y";
for (int i = 1; i < n; i++) {
// cout<<cur+chr[0]+chr[1]+cur+chr[0]+chr[2]+cur+chr[1]<<endl;
int len=press(cur+chr[0]+chr[1]+cur+chr[0]+chr[2]+cur+chr[1]);
if(len==cur.size())cur+=chr[2];
else if(len==cur.size()+2)cur+=chr[0];
else cur+=chr[1];
}
// cout<<cur<<el;
return cur;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
