제출 #497989

#제출 시각아이디문제언어결과실행 시간메모리
497989IOI_champion_in_1980콤보 (IOI18_combo)C++14
0 / 100
1 ms200 KiB
#include<bits/stdc++.h> using namespace std; int a, b, c, d, e, n, m; string s, t, st; int press(string p); string guess_sequence(int n) { st="ABXY"; for (a=0; a<st.length(); a++) { string p=""; p=p+st[a]; p=p+st[a]; if (press(p)) { for (b=0; b<st.length(); b++) { if (b==a) continue; string h=""; h=h+st[a]; for (c=0; c<st.length(); c++) { if (c==a) continue; h=h+st[b]; h=h+st[c]; if (press(h)==3) return h; } } } } }

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:9:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |  for (a=0; a<st.length(); a++)
      |            ~^~~~~~~~~~~~
combo.cpp:16:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |    for (b=0; b<st.length(); b++)
      |              ~^~~~~~~~~~~~
combo.cpp:21:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |     for (c=0; c<st.length(); c++)
      |               ~^~~~~~~~~~~~
combo.cpp:31:1: warning: control reaches end of non-void function [-Wreturn-type]
   31 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...