Submission #962594

#TimeUsernameProblemLanguageResultExecution timeMemory
962594Mohamed_Kachef06Combo (IOI18_combo)C++17
0 / 100
1 ms344 KiB
#include <bits/stdc++.h> #include "combo.h" //#include "grader.cpp" using namespace std; string guess_sequence(signed N){ char a[] = {'A' , 'B' , 'X' , 'Y'}; string s; if (s.empty()) for (int i = 0 ; i < 4 ; i++) {if (press(s+a[i])) {s+=a[i]; break;}}; for (int i = 0 ; i < N-1 ; i++){ random_shuffle(a , a+4); if (a[i] != s[0]) if (press(s+a[i]) > s.size()) {s+=a[i]; break;} } return s; }

Compilation message (stderr)

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