Submission #732202

#TimeUsernameProblemLanguageResultExecution timeMemory
732202baneCombo (IOI18_combo)C++17
10 / 100
81 ms440 KiB
#include<bits/stdc++.h> using namespace std; int press(std::string p); string guess_sequence(int N){ string ans = ""; int old = 0; vector<string>choices = {"A", "B", "X", "Y"}; for (int i = 0; i < N; i++){ for (int j = 0; j < 4; j++){ if (press(ans + choices[j]) > old){ ans += choices[j]; ++old; break; } } } assert(ans.size() == N); return ans; }

Compilation message (stderr)

In file included from /usr/include/c++/10/cassert:44,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:33,
                 from combo.cpp:1:
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:18:20: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   18 |  assert(ans.size() == N);
      |         ~~~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...