제출 #605443

#제출 시각아이디문제언어결과실행 시간메모리
605443AmirElarbi콤보 (IOI18_combo)C++14
0 / 100
0 ms208 KiB
#include <bits/stdc++.h> #define vi vector<int> #define gi greater<int> #define gr greater #define ve vector #define ll long long #define vf vector<float> #define vll vector<pair<ll,ll>> #define ii pair<int,int> #define pll pair<ll,ll> #define vvi vector<vi> #define vii vector<ii> #define gii greater<ii> #define pb push_back #define mp make_pair #define fi first #define se second #define INF 1e9 #define eps 1e-7 #define eps1 1e-2 #define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define MAX_A 2e5+5 using namespace std; const int MOD = 1e9+7; const int nax = 1e6+5; typedef complex<int> Point; #define X real() #define Y imag() #include "combo.h" char let[4] = {'A','B','X','Y'}; string guess_sequence(int n) { string s = ""; int beg = 0; if(press("A")) beg = 0,s = "A"; else if(press("B")) beg = 1,s= "B"; else if(press("X")) beg = 2,s = "X"; else beg = 3,s = "Y"; for (int i = 2; i <= n; ++i) { string cur = s+"X"+s+"YX"+s+"YY"+s+"YB"; int a = press(cur); if(a == i-1) s+="B"; else if(a == i) s+="X"; else s += "Y"; } return s; }

컴파일 시 표준 에러 (stderr) 메시지

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:34:9: warning: variable 'beg' set but not used [-Wunused-but-set-variable]
   34 |     int beg = 0;
      |         ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...