제출 #545666

#제출 시각아이디문제언어결과실행 시간메모리
545666aun5x콤보 (IOI18_combo)C++14
10 / 100
67 ms440 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { string p = "ABXY"; string guess = ""; while (guess.size() != N) { for (char c: p) { int res = press(guess+c); if (res - guess.size() == 1){ guess += c; break; } } } return guess; }

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

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