제출 #962595

#제출 시각아이디문제언어결과실행 시간메모리
962595Mohamed_Kachef06콤보 (IOI18_combo)C++17
10 / 100
25 ms1216 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; 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); for (int j = 0 ; j < 4 ; j++) if (a[j] != s[0]) if (press(s+a[j]) > s.size()) {s+=a[j]; break;} } return s; }

컴파일 시 표준 에러 (stderr) 메시지

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