제출 #269847

#제출 시각아이디문제언어결과실행 시간메모리
269847barsbold콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include "combo.h" #include <bits/stdc++.h> #define ff first #define ss second #define pb push_back std::string guess_sequence(int N) { std::string p = ""; std::string s = ""; s = p + 'A'; if(s[s.size() - 1] == 'A'){ int coins = press(s); if(coins == s.size()){ p+='A'; } } s = p + "B"; if(s[s.size() - 1] == 'B'){ int coins = press(s); if(coins == s.size()){ p+='B'; } } s = p +'X'; if(s[s.size() - 1] == 'X'){ int coins = press(s); if(coins == s.size()){ p+='X'; } } s = p + 'Y'; if(s[s.size() - 1] == 'Y'){ int coins = press(s); if(coins == s.size()){ p+='Y'; } } return p; }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:12:14: 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(coins == s.size()){
      |        ~~~~~~^~~~~~~~~~~
combo.cpp:19:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   19 |     if(coins == s.size()){
      |        ~~~~~~^~~~~~~~~~~
combo.cpp:26:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |     if(coins == s.size()){
      |        ~~~~~~^~~~~~~~~~~
combo.cpp:33:14: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   33 |     if(coins == s.size()){
      |        ~~~~~~^~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...