제출 #394304

#제출 시각아이디문제언어결과실행 시간메모리
394304Maqsut_03콤보 (IOI18_combo)C++14
10 / 100
89 ms568 KiB
#include "combo.h" #include <iostream> std::string guess_sequence(int N) { std::string p = ""; for (int i = 0; i < N; i++) { if (press(p + 'A') > p.size()) { p.push_back('A'); continue; } if (press(p + 'B') > p.size()) { p.push_back('B'); continue; } if (press(p + 'X') > p.size()) { p.push_back('X'); continue; } p.push_back('Y'); } // std::cout << p << std::endl; return p; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |  if (press(p + 'A') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
combo.cpp:12:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |  if (press(p + 'B') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
combo.cpp:16:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |  if (press(p + 'X') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...