Submission #545666

#TimeUsernameProblemLanguageResultExecution timeMemory
545666aun5xCombo (IOI18_combo)C++14
10 / 100
67 ms440 KiB
#include "combo.h" using namespace std; string guess_sequence(int N) { string p = "ABXY"; string guess = ""; while (guess.size() != N) { for (char c: p) { int res = press(guess+c); if (res - guess.size() == 1){ guess += c; break; } } } return guess; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:23: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
    9 |   while (guess.size() != N)
      |          ~~~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...