제출 #313948

#제출 시각아이디문제언어결과실행 시간메모리
313948amunduzbaev친구 (IOI14_friend)C++14
컴파일 에러
0 ms0 KiB
#include "grader.cpp" #include "friend.h" #include <bits/stdc++.h> using namespace std; #define pb(n) push_back(n) int findSample(int n,int c[],int h[],int p[]){ int ans=0; for(int i=n;i>0;i--){ if(p[i]==0){ ans+=c[i]; c[h[i]]=max(0,c[h[i]]-c[i]); }else if(p[i]==2){ c[h[i]]=max(c[h[i]],c[i]); }else{ c[h[i]]+=c[i]; } } ans+=c[0]; return ans; } /* 6 13 3 6 20 10 15 0 0 1 1 2 0 0 0 1 1 1 0 */

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

/tmp/ccax9KuP.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccxb4phD.o:friend.cpp:(.text.startup+0x0): first defined here
/tmp/ccax9KuP.o:(.bss+0xc3540): multiple definition of `confidence'
/tmp/ccxb4phD.o:(.bss+0xc3540): first defined here
/tmp/ccax9KuP.o:(.bss+0x0): multiple definition of `protocol'
/tmp/ccxb4phD.o:(.bss+0x0): first defined here
/tmp/ccax9KuP.o:(.bss+0x61aa0): multiple definition of `host'
/tmp/ccxb4phD.o:(.bss+0x61aa0): first defined here
collect2: error: ld returned 1 exit status