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;
#define ll long long int
std::string guess_sequence(int N) {
std::string p = "";
for (int i = 0; i < 4 * N; ++i) {
p += 'A';
}
std::vector<string> v = {"abx", "axb", "bax", "bxa", "xab", "xba", "aby", "ayb", "bay", "bya", "yab", "yba", "axy", "ayx", "xay", "xya", "yax", "yxa", "bxy", "byx", "xby", "xyb", "ybx", "yxb", "baa", "xaa", "yaa", "abb", "xbb", "ybb", "axx", "bxx", "yxx", "ayy", "byy", "xyy", "a", "b", "x", "y", "ab", "ax", "ay", "ba", "bx", "by", "xa", "xb", "xy", "ya", "yb", "yx"};
for (auto i : v) {
ll g = press(i);
if (g == N) {
return i;
}
}
}
Compilation message (stderr)
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:17: warning: control reaches end of non-void function [-Wreturn-type]
11 | std::string p = "";
| ^~
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |