제출 #1071636

#제출 시각아이디문제언어결과실행 시간메모리
1071636Rigobertus콤보 (IOI18_combo)C++17
0 / 100
2 ms600 KiB
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <set> #include <queue> #include <string> //#define int long long #include "combo.h" using namespace std; string guess_sequence(int n) { string c[4] = { "A", "B", "X", "Y"}; string s = ""; while (s.size() < n) { for (int i = 0; i < 4; i++) { string p = s + c[4]; if (press(p) > s.size()) { s = p; } } } return s; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:15:21: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   15 |     while (s.size() < n) {
      |            ~~~~~~~~~^~~
combo.cpp:18:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |             if (press(p) > s.size()) {
      |                 ~~~~~~~~~^~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...