Submission #303706

#TimeUsernameProblemLanguageResultExecution timeMemory
303706Gilgamesh콤보 (IOI18_combo)C++17
5 / 100
1 ms200 KiB
#include "combo.h" std::string guess_sequence(int N) { std::string strs[4] = {"A", "B", "X", "Y"}; std::string ans = ""; if(N == 3){ while(N--){ for(int i = 0; i < 4; ++i){ int cur = press(ans + strs[i]); if(cur == ans.length() + 1) { ans += strs[i]; break; } } } } return ans; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |                 if(cur == ans.length() + 1) {
      |                    ~~~~^~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...