Submission #1071636

#TimeUsernameProblemLanguageResultExecution timeMemory
1071636RigobertusCombo (IOI18_combo)C++17
0 / 100
2 ms600 KiB
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <set> #include <queue> #include <string> //#define int long long #include "combo.h" using namespace std; string guess_sequence(int n) { string c[4] = { "A", "B", "X", "Y"}; string s = ""; while (s.size() < n) { for (int i = 0; i < 4; i++) { string p = s + c[4]; if (press(p) > s.size()) { s = p; } } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:15:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   15 |     while (s.size() < n) {
      |            ~~~~~~~~~^~~
combo.cpp:18:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |             if (press(p) > s.size()) {
      |                 ~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...