Submission #216627

#TimeUsernameProblemLanguageResultExecution timeMemory
216627achvanovCombo (IOI18_combo)C++17
10 / 100
111 ms584 KiB
#include <bits/stdc++.h> #include <combo.h> using namespace std; char c[] = {'A', 'B', 'X', 'Y'}; string guess_sequence(int n) { string res = ""; for (int i = 0; i < n; ++i) { for (int j = 0; j < 4; ++j) { if (press(res + c[j]) > res.size()) { res += c[j]; break; } } } return res; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:29: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   12 |       if (press(res + c[j]) > res.size()) {
      |           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...