Submission #123712

#TimeUsernameProblemLanguageResultExecution timeMemory
123712mlyean00Combo (IOI18_combo)C++14
10 / 100
120 ms460 KiB
#include <bits/stdc++.h>
#include "combo.h"

using namespace std;

string guess_sequence(int N) {
    string s;
    for (int i = 0; i < N; ++i) {
        for (char c : "ABXY") {
            if (press(s + c) > s.size()) {
                s += c;
                break;
            }
        }
    }
    return s;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:10:30: 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(s + c) > s.size()) {
      |                 ~~~~~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...