제출 #1084665

#제출 시각아이디문제언어결과실행 시간메모리
1084665Aliyyiakbar콤보 (IOI18_combo)C++17
10 / 100
39 ms944 KiB
#include "bits/stdc++.h" #include "combo.h" using namespace std; string guess_sequence(int n) { int d = 0; string res = ""; set<string>st = {"A","B","X","Y"}; if (press("A")) { res += "A"; st.erase("A"); } else if (press("B")) { res += "B"; st.erase("B"); } else if (press("X")) { res += "X"; st.erase("X"); } else { res += "Y"; st.erase("Y"); } for (int i = 1; i <= n; ++i) { for (auto x : st) { if (press(res + x) > i) { res += x; break; } } } return res; }

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

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