제출 #239213

#제출 시각아이디문제언어결과실행 시간메모리
239213Sarah_Mokhtar콤보 (IOI18_combo)C++14
10 / 100
87 ms456 KiB
#include <bits/stdc++.h> #include "combo.h" #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") using namespace std; typedef long long ll; const ll N=5e5+10,M=1e5+10,mod=1000000; const ll OO=1e16; #define SARAH ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define scan(A,n) for (int i=0;i<n;++i) cin>>A[i]; #define pb push_back #define f first #define s second #define bs binary_search #define fill2(A, x) for(int i=0;i<N;++i) for(int j=0;j<N;++j) A[i][j]=x; #define set2(A, x) fill(A,A+N,x); #define scan2(A, n, m) for(int i=0;i<n;++i) for(int j=0;j<m;++j) cin >> A[i][j]; #define set(A, x) memset(A, x, sizeof(A)) #define print(A, x) for (int i=0;i<x;++i) cout<<A[i]<< " "; #define pii pair<int, int> #define pll pair<ll, ll> #define low lower_bound #define high upper_bound #define bits(x) __builtin_popcountll(x) #define sz size #define cl clear #define all(A) A.bg(), A.en() #define REPEAT main() #define dig(n) log10(n)+1; #define vi vector<int> #define vl vector<ll> char moves[]={'A','B','X','Y'}; string guess_sequence(int n){ vector<char>ret; char first; string s=""; for(int i=0;i<4;++i){ s=""; s+=moves[i]; int ans=press(s); if(ans==1){ first=moves[i]; break; } } s=""; s+=first; for(int i=1;i<n;++i){ string tmp=s; for(int j=0;j<4;++j){ tmp=s; if(moves[j]==first) continue; tmp+=moves[j]; if(press(tmp)==i+1){ s=tmp; break; } } } return s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...