제출 #156661

#제출 시각아이디문제언어결과실행 시간메모리
156661killB0x콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include "combo.h" using namespace std; using namespace __gnu_pbds; #define watch(x) cout<<(#x)<<"="<<(x)<<'\n' #define mset(d,val) memset(d,val,sizeof(d)) #define setp(x) cout<<fixed<<setprecision(x) #define forn(i,a,b) for(int i=a;i<b;i++) #define fore(i,a,b) for(int i=a;i<=b;i++) #define pb push_back #define F first #define S second #define INF 2e14 #define MOD 998244353 #define pqueue priority_queue #define fbo find_by_order #define ook order_of_key typedef long long ll; typedef pair<ll,ll> ii; typedef vector<ll> vi; typedef vector<ii> vii; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds; #define MAXN 100005 char ch[4]={'A','B','X','Y'}; string guess_sequence(int n){ char x; string tmp; for(int i=0;i<4;i++) { x=ch[i]; if(press(""+x)==1) { tmp+=x; break; } } for(int i=1;i<n;i++) { for(int j=0;j<4;j++) { if(ch[j]!=x) { if(press(tmp+ch[j])==i+1) { tmp+=ch[j]; break; } } } } return tmp; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...