제출 #1073959

#제출 시각아이디문제언어결과실행 시간메모리
1073959Malix친구 (IOI14_friend)C++14
컴파일 에러
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()); }

컴파일 시 표준 에러 (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());
      |                                                    ^~~