Submission #114003

#TimeUsernameProblemLanguageResultExecution timeMemory
114003baqargamGame (IOI14_game)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "game.h" #include "grader.cpp" using namespace std; int n,m,k,l,i,j,a,b,col[105],sz[105],d[105][105]; void initialize(int n) { for(i=0;i<n;i++){ col[i]=i;sz[i]=1; } for(int i=0;i<n*(n-1)/2;i++) { cin>>a>>b; cout<<hasEdge(a,b); } } void unite(int a,int b){ sz[a]+=sz[b]; for(int i=0;i<n;i++){ if(col[i]==b) col[i]=a; d[a][i]+=d[b][i]; } } int hasEdge(int u, int v) { if(d[col[a]][col[b]]+1==sz[a]*sz[b]) { unite(col[a],col[b]); return 1; } else return 0; }

Compilation message (stderr)

/tmp/ccYAKmas.o: In function `read_int()':
grader.cpp:(.text+0x0): multiple definition of `read_int()'
/tmp/ccCsOKGl.o:game.cpp:(.text+0x0): first defined here
/tmp/ccYAKmas.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccCsOKGl.o:game.cpp:(.text.startup+0x0): first defined here
/tmp/ccYAKmas.o:(.bss+0x0): multiple definition of `rets'
/tmp/ccCsOKGl.o:(.bss+0xb000): first defined here
collect2: error: ld returned 1 exit status