Submission #885805

#TimeUsernameProblemLanguageResultExecution timeMemory
885805BBart888Combo (IOI18_combo)C++14
5 / 100
1 ms344 KiB
#include <cstdio> #include <iostream> #include <vector> #include <list> #include <string> #include <set> #include <map> #include <algorithm> #include <fstream> #include <cmath> #include <queue> #include <stack> #include <cassert> #include <cstring> #include <climits> #include <functional> #include<cstdlib> //#include "arc.h" using namespace std; typedef pair<int, int> PII; typedef vector<int> VI; typedef long long LL; const int MAXN = 8e3 + 11; using ll = long long; typedef vector<int> lnum; const int base = 1e9; const ll mod1 = 1e9 + 7; const ll mod2 = 1000000021; const ll P = 31; /* void setIO(string name = "") { cin.tie(0)->sync_with_stdio(0); // see /general/fast-io if ((name.size())) { freopen((name + ".in").c_str(), "r", stdin); // see /general/input-output freopen((name + ".out").c_str(), "w", stdout); } } */ int press(string p); string rota[4]{ "A","B","X","Y" }; string guess_sequence(int N) { string start = ""; for (int i = 0; i < 4; i++) { int cnt = 0; for (int j = 0; j < 4; j++) { string test = "" + rota[j] + rota[i]; if (press(test) == 1) cnt++; } if (cnt == 4) start = rota[i]; } int now = 1; for (int i = 1; i < N; i++) { for (int j = 0; j < 4; j++) { if (rota[j] == start) continue; string test = start + rota[j]; if (press(test) == now + 1) { start += rota[j]; now++; break; } } } return start; } /* int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); //setIO("time"); return 0; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...