제출 #624762

#제출 시각아이디문제언어결과실행 시간메모리
624762chubyxdxd콤보 (IOI18_combo)C++11
0 / 100
1 ms208 KiB
#include "combo.h" using namespace std; std::string guess_sequence(int N) { string S= ""; for(int i=0;i<N;i++){ if(press(S+"AB")>S.size()){ if(press(S+"A")>S.size())S+='A'; else S+='B'; } else{ if(press(S+"X")>S.size())S+='X'; else S+='Y'; } } return S; }

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

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