Submission #145779

#TimeUsernameProblemLanguageResultExecution timeMemory
145779ps_penguin최댓값 (tutorial2)C++14
Compilation error
0 ms0 KiB
int GetMax(int N,int *A) { int mx=0; for(int i=0;i<N;i++) { mx=max(mx,A[i]); } return mx; }

Compilation message (stderr)

tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:6:12: error: 'max' was not declared in this scope
         mx=max(mx,A[i]);
            ^~~
tutorial2.cpp:6:12: note: suggested alternative: 'mx'
         mx=max(mx,A[i]);
            ^~~
            mx