#include "combo.h"
#include <bits/stdc++.h>
#define endl '\n'
#define pb push_back
#define F first
#define S second
#define all(v) v.begin(), v.end()
#define allr(v) v.rbegin(), v.rend()
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
string guess_sequence(int n){
string p = "";
// press(p): gives the amount of coins you get by pressing the string p
vector<string> pp = {
"ABX", "ABY", "ABB", "AXB", "AXY", "AXX", "AYY", "AYX", "AYB",
"BAX", "BAY", "BAA", "BXX", "BXY", "BXA", "BYY", "BYX", "BYA",
"XAB", "XAA", "XAY", "XBB", "XBA", "XBY", "XYY", "XYA", "XYB",
"YAB", "YAA", "YAX", "YBA", "YBB", "YBX", "YXX", "YXA", "YXB"
};
for(string t : pp) if(press(t) == 3) return t;
}
Compilation message (stderr)
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
24 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |