제출 #313488

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
3134882020-10-16 06:09:35juggernaut친구 (IOI14_friend)C++14
컴파일 에러
0 ms0 KiB
#include"friend.h"
//#include"grader.cpp"
#include<bits/stdc++.h>
using namespace std;
vector<int>g[1005];
bool can[15][15];
int dp[1005][2],confidence[1005];
void add(int x,int y){
g[x].push_back(y);
g[y].push_back(x);
}
void dfs(int v,int p){
dp[v][0]=dp[v][1]=0;
dp[v][1]+=confidence[v];
for(int to:g[v])
if(to!=p){
dfs(to,v);
dp[v][0]+=max(dp[to][0],dp[to][1]);
dp[v][1]+=dp[to][0];
}
}
int findSample(int n,int Confidence[],int host[],int protocol[]){
copy(Confidence,Confidence+n,confidence);
for(int i=1;i<n;i++){
if(protocol[i]==0){
add(host[i],i);
}else if(protocol[i]==1){
for(int to:g[host[i]])add(i,to);
}else if(protocol[i]==2){
for(int to:g[host[i]])add(i,to);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

/tmp/ccrVlwk0.o:(.bss+0xc3540): multiple definition of `confidence'
/tmp/ccwk1X7s.o:(.bss+0x0): first defined here
/usr/bin/ld: Warning: size of symbol `confidence' changed from 4020 in /tmp/ccwk1X7s.o to 400008 in /tmp/ccrVlwk0.o
collect2: error: ld returned 1 exit status