제출 #134220

#제출 시각아이디문제언어결과실행 시간메모리
134220reda콤보 (IOI18_combo)C++14
30 / 100
58 ms448 KiB
#include<bits/stdc++.h> using namespace std ; #define pb push_back #define ll long long #define ld long double #define mp make_pair #define MOD 1000000007 #define endl '\n' #pragma GCC optimize ("O3") #include "combo.h" string guess_sequence(int N) { char a[] = {'A', 'B', 'Y', 'X'}; char ban = 'X', def = 'A'; string cur; int coins; for(int i = 0; i < 3; i++) if(press(string(1, a[i]))) { ban = a[i]; def = a[(i+1)%4]; break; } cur = ban; char c; for(int k = 2; k <= N; k++) { c = def; for(int i = 0; i < 4; i++) { if(a[i] == ban || a[i] == def) continue; if(press(cur+a[i]) == k) { c = a[i]; break; } } cur += c; } return cur; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:16:7: warning: unused variable 'coins' [-Wunused-variable]
   16 |   int coins;
      |       ^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...