Submission #874076

#TimeUsernameProblemLanguageResultExecution timeMemory
874076kxdFriend (IOI14_friend)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "friend.h" //#define DEBUG 1106 #define int long long #define ll long long #define ld long double #define pb push_back #define p_q priority_queue #define m_p make_pair #define pii pair<int,int> #define endl '\n' #define INIT ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define FOR(i,a,b) for(int i = a; i <= b; i++) #define forn(i,n) for (int i = 0; i < n; i++) #define forn1(i,n) #define all(x) x.begin(),x.end() #define ft first #define sd second #define lowbit(x) (x&(-x)) #define chmax(x,y) x=max(x,y) #define chmin(x,y) x=min(x,y) using namespace std; int findSample(n, confidence, host, protocol) { int ret = 0; forn1(i,n) ret += confidence[i]; return ret; }

Compilation message (stderr)

friend.cpp:25:16: error: 'long long int findSample' redeclared as different kind of entity
   25 | int findSample(n, confidence, host, protocol) {
      |                ^
In file included from friend.cpp:2:
friend.h:7:5: note: previous declaration 'int findSample(int, int*, int*, int*)'
    7 | int findSample(int n,int confidence[],int host[],int protocol[]);
      |     ^~~~~~~~~~
friend.cpp:25:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   25 | int findSample(n, confidence, host, protocol) {
      |                ^
      |                yn
friend.cpp:25:19: error: 'confidence' was not declared in this scope
   25 | int findSample(n, confidence, host, protocol) {
      |                   ^~~~~~~~~~
friend.cpp:25:31: error: 'host' was not declared in this scope
   25 | int findSample(n, confidence, host, protocol) {
      |                               ^~~~
friend.cpp:25:37: error: 'protocol' was not declared in this scope
   25 | int findSample(n, confidence, host, protocol) {
      |                                     ^~~~~~~~