Submission #166564

# Submission time Handle Problem Language Result Execution time Memory
166564 2019-12-02T19:57:12 Z dyd Carnival (CEOI14_carnival) C++14
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
const int MAXN=200;
int c[MAXN];
int party(int k,int v[]){
	
}
int responde(int n){
	int cur=1;
	for(int i=1;i<=n;i++){
		if(c[i]==0){
			c[i]=cur;
			cur++;
		}
		for(int j=i+1;j<=n;j++){
			if(c[j]!=0) continue;
			int v[]={i,j};
			int x=party(2,v);
			if(x==1) c[j]=c[i]; 
		}
	}
	printf("0");
	for(int i=1;i<=n;i++) printf(" %d",c[i]);
	return 0;
}

Compilation message

carnival.cpp: In function 'int party(int, int*)':
carnival.cpp:6:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
/usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status