제출 #306078

#제출 시각아이디문제언어결과실행 시간메모리
306078stoyan_malinin콤보 (IOI18_combo)C++14
30 / 100
67 ms548 KiB
#include "combo.h" //#include "grader.cpp" using namespace std; string guess_sequence(int N) { string ans = ""; if(press("AB")>0) { if(press("A")>0) ans += "A"; else ans += "B"; } else { if(press("X")>0) ans += "X"; else ans += "Y"; } for(int i = 1;i<N;i++) { if(press(ans+"A"+ans+"B")>ans.size()) { if(press(ans+"A")>ans.size()) ans += "A"; else ans += "B"; } else { if(press(ans+"X")>ans.size()) ans += "X"; else ans += "Y"; } } return ans; }

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

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