제출 #1104023

#제출 시각아이디문제언어결과실행 시간메모리
1104023asdfghjk콤보 (IOI18_combo)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back #define all(x) x.begin(), x.end() #define F first #define ld long double #define S second using namespace std; const ll N = 5e3 + 5; const ll NN = 4e5 + 5; const ll INF = 1e18; const ll inf = 1e9; const ll MOD = 1e9 + 7; int was[10]; int press(std::string p); string guess_sequence(int n){ string a = "qwertythjyh"; string s = ""; s = "ABX"; if(press("ABX")==0){ s = "Y"; a[1] = 'A'; a[2] = 'B'; a[3] = 'X'; } else if(press("ABY") == 0){ s = "X"; a[1] = 'A'; a[2] = 'B'; a[3] = 'Y'; } else if(press("AXY") == 0){ s = "B"; a[1] = 'A'; a[2] = 'Y'; a[3] = 'X'; } else{ s = "A"; a[1] = 'Y'; a[2] = 'B'; a[3] = 'X'; } for(int i = 2;i <= n;i++){ string d = s; d += a[1]; d += a[2]; int z = press(d); z -= int(s.size()); d = s; d += a[1]; d += a[1]; int x= press(d); x -= int(s.size()); if(z == 0){ s += a[3]; continue; } else if(z == 1 && x == 0){ s += a[2]; } else{ s += a[1]; } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...