Submission #306078

#TimeUsernameProblemLanguageResultExecution timeMemory
306078stoyan_malininCombo (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; }

Compilation message (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...