Submission #1062442

#TimeUsernameProblemLanguageResultExecution timeMemory
1062442Wasif_ShahzadCombo (IOI18_combo)C++17
10 / 100
55 ms852 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { vector<char> moves = {'A', 'B', 'X', 'Y'}; string ans; for(int i = 0; i < N; i++){ for(char option: moves){ string tmp = ans + option; int cur = press(tmp); if(cur == ans.size() + 1){ ans = tmp; break; } } } return ans; }

Compilation message (stderr)

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