Submission #1073959

#TimeUsernameProblemLanguageResultExecution timeMemory
1073959MalixFriend (IOI14_friend)C++14
Compilation error
0 ms0 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; #define REP(a,b,c) for(int a=b;a<c;a++) #define F first #define S second #define PB push_back typedef long long ll; typedef vector<int> vi; typedef vector<vi> vii; typedef pair<int,int> pi; vii a; // Find out best sample int findSample(int n,int confidence[],int host[],int protocol[]){ return *max_element(confidence.begin(),confidence.end()); }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:19:33: error: request for member 'begin' in 'confidence', which is of non-class type 'int*'
   19 |  return *max_element(confidence.begin(),confidence.end());
      |                                 ^~~~~
friend.cpp:19:52: error: request for member 'end' in 'confidence', which is of non-class type 'int*'
   19 |  return *max_element(confidence.begin(),confidence.end());
      |                                                    ^~~