Submission #546520

#TimeUsernameProblemLanguageResultExecution timeMemory
546520srivatsav_kannanCombo (IOI18_combo)C++14
0 / 100
1 ms208 KiB
#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; vector<string> all; string ar[4] = {"A", "B", "X", "Y"}; void fills(string cur){ if (cur.size() == 3) all.push_back(cur); for (int j = 0; j < 4; j++){ if (ar[j][0] == cur[0]) continue; string temp = cur; temp += ar[j][0]; fills(temp); } } string guess_sequence(signed n){ if (n == 3 && false){ fills(""); int cur = all.size(); for (int i = 0; i < cur; i++) { if (press(all[i]) == 3) return all[i]; } } string ans; for (int i = 0; i < n; i++){ for (int j = 0; j < 4; j++) { if (press(ar[j]) == 1) { ans += ar[j]; break; } } } return ans; } //signed main(){ // ios_base::sync_with_stdio(false); // cin.tie(0); // cout.tie(0); // //}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...