제출 #404162

#제출 시각아이디문제언어결과실행 시간메모리
404162peuch친구 (IOI14_friend)C++17
컴파일 에러
0 ms0 KiB
#include "friend.h"

// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
	int maxi = 0;
	for(int i = 0; i < n; i++)
		maxi = max(confidence[i], maxi);
	return sum;
}

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

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:7:10: error: 'max' was not declared in this scope; did you mean 'maxi'?
    7 |   maxi = max(confidence[i], maxi);
      |          ^~~
      |          maxi
friend.cpp:8:9: error: 'sum' was not declared in this scope
    8 |  return sum;
      |         ^~~