Submission #197878

#TimeUsernameProblemLanguageResultExecution timeMemory
197878MasterdanFriend (IOI14_friend)C++14
Compilation error
0 ms0 KiB
#include "friend.h" #include <bits/stdc++.h> // Find out best sample #define all(a) a.begin (),a.end () #define MIN -1 #define MAX 1e9+7 #define F first #define S second #define mk make_pair() #define pb push_back using namespace std; typedef vector <int> vi; typedef pair<int, int> ii; int findSample(int n,int confidence[],int host[],int protocol[]){ vi v; for(int i=0;i<n;i++)v.pb(confidence[i]); sort(all(v)); return v[n-1]+v[n-2]; } #include <cstdio> #include <cassert> #define __MAXSIZE__ 100002 using namespace std; // Confidence int confidence[__MAXSIZE__]; // Host int host[__MAXSIZE__]; // Protocol int protocol[__MAXSIZE__]; // Main int main(void) { int n,i; // Number of people assert(scanf("%d",&n)==1); // Confidence for(i=0;i<n;i++) assert(scanf("%d",&confidence[i])==1); // Host and Protocol for(i=1;i<n;i++) assert(scanf("%d %d",&host[i],&protocol[i])==2); // Answer printf("%d\n",findSample(n,confidence,host,protocol)); return 0; }

Compilation message (stderr)

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