Submission #477815

#TimeUsernameProblemLanguageResultExecution timeMemory
477815chungdinhCombo (IOI18_combo)C++14
10 / 100
90 ms460 KiB
#include "combo.h" char lst[4] = {'A', 'B', 'X', 'Y'}; std::string guess_sequence(int N) { std::string res = ""; for (int i = 0; i < N; i++) { for (int j = 0; j < 4; j++) { if (press(res + lst[j]) == res.size() + 1) { res = res + lst[j]; break; } } } return res; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:37: 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 (press(res + lst[j]) == res.size() + 1) {
      |                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...