# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
546526 | srivatsav_kannan | Combo (IOI18_combo) | C++14 | 52 ms | 452 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 <iostream>
#include <fstream>
#include <vector>
#include <set>
#include <queue>
#include <cmath>
#include <map>
#include <algorithm>
#include <numeric>
#include <stack>
#include <cstring>
#include <bitset>
#include <climits>
#include <valarray>
#include <list>
#include "combo.h"
//#define int long long
#define INF 1000000000
#define endl '\n'
#define mod 1000000007
using namespace std;
string ar[4] = {"A", "B", "X", "Y"};
string guess_sequence(signed n){
string ans = "";
for (int i = 0; i < n; i++){
for (int j = 0; j < 4; j++) {
if (ans.size() >= 1 && ar[j][0] == ans[0]) continue;
string temp = ans;
temp += ar[j];
if (press(temp) == ans.size()+1) {
ans += ar[j];
break;
}
}
}
return ans;
}
//signed main(){
// ios_base::sync_with_stdio(false);
// cin.tie(0);
// cout.tie(0);
//
//}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |