Submission #908726

#TimeUsernameProblemLanguageResultExecution timeMemory
908726AiperiiiCombo (IOI18_combo)C++14
10 / 100
27 ms1216 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; string guess_sequence(int N) { string s="",t="ABXY"; for(int j=0;j<N;j++){ for(int i=0;i<t.size();i++){ if(s.size()>0 && t[i]==s[0])continue; string x=s; x+=t[i]; if(press(x)==x.size()){ s=x; break; } } } return s; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:7:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |         for(int i=0;i<t.size();i++){
      |                     ~^~~~~~~~~
combo.cpp:11:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |             if(press(x)==x.size()){
      |                ~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...