제출 #1062442

#제출 시각아이디문제언어결과실행 시간메모리
1062442Wasif_Shahzad콤보 (IOI18_combo)C++17
10 / 100
55 ms852 KiB
#include "combo.h" #include <bits/stdc++.h> using namespace std; std::string guess_sequence(int N) { vector<char> moves = {'A', 'B', 'X', 'Y'}; string ans; for(int i = 0; i < N; i++){ for(char option: moves){ string tmp = ans + option; int cur = press(tmp); if(cur == ans.size() + 1){ ans = tmp; break; } } } return ans; }

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

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