제출 #139580

#제출 시각아이디문제언어결과실행 시간메모리
139580Bazarkuly2003콤보 (IOI18_combo)C++14
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h>
//#include<string>
//#include<cmath>
//#include<conio.h>
#define ll long  long
#define N 1000001
using namespace std;
ll n;

int press(string p){
}

int main(){
	ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
cin>>n;
if(pass("A")==1){s="A";q="BXY";}else
if(pass("B")==1){s="B";q="AXY";}else
if(pass("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";}
k=3;
t=s+q[0]+q[0]+s+q[0]+q[1]+s+q[0]+q[2]+s+q[1];
while(s.size()<n){
m=pass(t);
if(m==s.size()+0)s+=q[2];else
if(m==s.size()+1)s+=q[1];else s+=q[0];}
cout<<s;
}

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

combo.cpp: In function 'int press(std::string)':
combo.cpp:11:1: warning: no return statement in function returning non-void [-Wreturn-type]
   11 | }
      | ^
combo.cpp: In function 'int main()':
combo.cpp:16:4: error: 'pass' was not declared in this scope
   16 | if(pass("A")==1){s="A";q="BXY";}else
      |    ^~~~
combo.cpp:16:18: error: 's' was not declared in this scope
   16 | if(pass("A")==1){s="A";q="BXY";}else
      |                  ^
combo.cpp:16:24: error: 'q' was not declared in this scope
   16 | if(pass("A")==1){s="A";q="BXY";}else
      |                        ^
combo.cpp:17:18: error: 's' was not declared in this scope
   17 | if(pass("B")==1){s="B";q="AXY";}else
      |                  ^
combo.cpp:17:24: error: 'q' was not declared in this scope
   17 | if(pass("B")==1){s="B";q="AXY";}else
      |                        ^
combo.cpp:18:18: error: 's' was not declared in this scope
   18 | if(pass("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";}
      |                  ^
combo.cpp:18:24: error: 'q' was not declared in this scope
   18 | if(pass("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";}
      |                        ^
combo.cpp:18:38: error: 's' was not declared in this scope
   18 | if(pass("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";}
      |                                      ^
combo.cpp:18:44: error: 'q' was not declared in this scope
   18 | if(pass("X")==1){s="X";q="ABY";}else{s="Y";q="ABX";}
      |                                            ^
combo.cpp:19:1: error: 'k' was not declared in this scope
   19 | k=3;
      | ^
combo.cpp:20:1: error: 't' was not declared in this scope
   20 | t=s+q[0]+q[0]+s+q[0]+q[1]+s+q[0]+q[2]+s+q[1];
      | ^
combo.cpp:20:3: error: 's' was not declared in this scope
   20 | t=s+q[0]+q[0]+s+q[0]+q[1]+s+q[0]+q[2]+s+q[1];
      |   ^
combo.cpp:20:5: error: 'q' was not declared in this scope
   20 | t=s+q[0]+q[0]+s+q[0]+q[1]+s+q[0]+q[2]+s+q[1];
      |     ^
combo.cpp:22:1: error: 'm' was not declared in this scope
   22 | m=pass(t);
      | ^
combo.cpp:22:3: error: 'pass' was not declared in this scope
   22 | m=pass(t);
      |   ^~~~