제출 #303735

#제출 시각아이디문제언어결과실행 시간메모리
303735GilgameshCombo (IOI18_combo)C++17
10 / 100
88 ms528 KiB
#include "combo.h" std::string guess_sequence(int N) { std::string strs[4] = {"A", "B", "X", "Y"}; std::string ans = ""; while(N--){ for(int i = 0; i < 4; ++i){ int cur = press(ans + strs[i]); if(cur == ans.length() + 1) { ans += strs[i]; break; } } } return ans; }

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

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