Submission #380411

#TimeUsernameProblemLanguageResultExecution timeMemory
380411hgmhc최댓값 (tutorial2)C++17
Compilation error
0 ms0 KiB
int GetMax(int N, int *A) { int mx = -1; 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:4:10: error: 'max' was not declared in this scope; did you mean 'mx'?
    4 |     mx = max(mx,A[i]);
      |          ^~~
      |          mx