제출 #1111888

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
11118882024-11-13 09:40:35nikolashami콤보 (IOI18_combo)C++17
100 / 100
50 ms2056 KiB
#include<bits/stdc++.h>
using namespace std;
#include "combo.h"
string qs;
int q;
string guess_sequence(int N){
int n=N;
char prvi;
qs="ABAB";
q=press(qs);
if(!q){
qs="X";
if(press(qs))
prvi='X';
else
prvi='Y';
}else{
qs="A";
if(press(qs))
prvi='A';
else
prvi='B';
}
qs.clear();
qs.push_back(prvi);
vector<char>v={'A','B','X','Y'};
v.erase(find(v.begin(),v.end(),prvi));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:33:17: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   33 |  while(qs.size()<n-1){
      |        ~~~~~~~~~^~~~
combo.cpp:66:6: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
   66 |     }else
      |      ^~~~
combo.cpp:68:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
   68 |  return qs;
      |  ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...