제출 #3241

#제출 시각아이디문제언어결과실행 시간메모리
3241BothEarRim최댓값 (tutorial2)C++98
컴파일 에러
0 ms0 KiB
#include <algorithm> int GetMax(int N, int *A){ int res = A[0]; for(int i=1; i<N; i++) res = max(res, A[i]); return res; }

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

tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:5:44: error: 'max' was not declared in this scope
tutorial2.cpp:5:44: note: suggested alternative:
/usr/include/c++/4.6/bits/stl_algobase.h:254:5: note:   'std::max'