Submission #206468

#TimeUsernameProblemLanguageResultExecution timeMemory
206468vardan__02Combo (IOI18_combo)C++14
10 / 100
104 ms432 KiB
#include <algorithm> #include <iostream> #include <fstream> #include <cstring> #include <string> #include "combo.h" #include <vector> #include <cstdio> #include <queue> #include <deque> #include <stack> #include <list> #include <set> #include <map> using namespace std; typedef long long ll; string guess_sequence(int N) { string ans=""; string ban="ABXY"; int x; while(ans.size()!=N) { for(int i=0;i<=3;i++) { x = press(ans+ban[i]); if(x==ans.size()+1) { ans+=ban[i]; break; } } } return ans; }

Compilation message (stderr)

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