# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1141894 | mehdiba | Combo (IOI18_combo) | C++20 | 0 ms | 408 KiB |
#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;
string tt = "ABXY";
for(int i = 0; i < n; i++){
string t;
t += tt[i];
for(int j = i + 1; j < n; j++){
t += tt[j];
for(int k = j + 1; k < n; k++){
t += tt[k];
pp.pb(t);
}
}
}
for(string t : pp) if(press(t) == 3) return t;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |