제출 #139677

#제출 시각아이디문제언어결과실행 시간메모리
139677Bazarkuly2003콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include "combo.h" #include<bits/stdc++.h> using namespace std; string guess_sequence(int N){ string s,q,t; int m; if(press("AB")==1){ if(press("A")==1){s="A";q="BXY";}else{s="B";q="AXY";}}else if(press("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";} while(s.size()<N){ if(s.size()*4+7>N*4){t=s+q[0]+q[1]; m=press(t);t=s+q[0]; if(m==s.size()+2)s=s+q[0]+q[1];else if(m==s.size()+1){ if(press(t)==s.size()+1)s+=q[0]; else s+=q[1];}else if(m==s.size()+0) s+=q[2]; } else{ t=s+q[0]+q[0]+s+q[0]+q[1]+s+q[0]+q[2]+s+q[1]; m=press(t); if(m==s.size()+0)s+=q[2];else if(m==s.size()+1)s+=q[1];else if(m==s.size()+2)s+=q[0];} } return s; }#include<bits/stdc++.h> //#include<string> //#include<cmath> //#include<conio.h> #define ll long long #define N 1000001 using namespace std; ll n; int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); }

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

combo.cpp:30:2: error: stray '#' in program
   30 | }#include<bits/stdc++.h>
      |  ^
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:11:15: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   11 | while(s.size()<N){
      |       ~~~~~~~~^~
combo.cpp:13:17: warning: comparison of integer expressions of different signedness: 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   13 |  if(s.size()*4+7>N*4){t=s+q[0]+q[1];
      |     ~~~~~~~~~~~~^~~~
combo.cpp:16:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   16 |      if(m==s.size()+2)s=s+q[0]+q[1];else
      |         ~^~~~~~~~~~~~
combo.cpp:17:7: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |   if(m==s.size()+1){  if(press(t)==s.size()+1)s+=q[0];  else s+=q[1];}else
      |      ~^~~~~~~~~~~~
combo.cpp:17:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |   if(m==s.size()+1){  if(press(t)==s.size()+1)s+=q[0];  else s+=q[1];}else
      |                          ~~~~~~~~^~~~~~~~~~~~
combo.cpp:18:10: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |      if(m==s.size()+0) s+=q[2];
      |         ~^~~~~~~~~~~~
combo.cpp:24:5: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   24 | if(m==s.size()+0)s+=q[2];else
      |    ~^~~~~~~~~~~~
combo.cpp:25:5: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 | if(m==s.size()+1)s+=q[1];else
      |    ~^~~~~~~~~~~~
combo.cpp:26:5: 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(m==s.size()+2)s+=q[0];}
      |    ~^~~~~~~~~~~~
combo.cpp: At global scope:
combo.cpp:30:3: error: 'include' does not name a type
   30 | }#include<bits/stdc++.h>
      |   ^~~~~~~