제출 #867976

#제출 시각아이디문제언어결과실행 시간메모리
867976wii콤보 (IOI18_combo)C++17
10 / 100
38 ms1440 KiB
#include "combo.h" std::string guess_sequence(int N) { std::string S; for (int i = 1; i <= N; ++i) { for (char c: {'A', 'B', 'X', 'Y'}) { S.push_back(c); if (press(S) == S.size()) break; S.pop_back(); } } return S; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |             if (press(S) == S.size())
      |                 ~~~~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...