Submission #394304

#TimeUsernameProblemLanguageResultExecution timeMemory
394304Maqsut_03Combo (IOI18_combo)C++14
10 / 100
89 ms568 KiB
#include "combo.h" #include <iostream> std::string guess_sequence(int N) { std::string p = ""; for (int i = 0; i < N; i++) { if (press(p + 'A') > p.size()) { p.push_back('A'); continue; } if (press(p + 'B') > p.size()) { p.push_back('B'); continue; } if (press(p + 'X') > p.size()) { p.push_back('X'); continue; } p.push_back('Y'); } // std::cout << p << std::endl; return p; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    8 |  if (press(p + 'A') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
combo.cpp:12:21: 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(p + 'B') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
combo.cpp:16:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |  if (press(p + 'X') > p.size()) {
      |      ~~~~~~~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...