Submission #250125

# Submission time Handle Problem Language Result Execution time Memory
250125 2020-07-17T04:21:59 Z linear00000 최댓값 (tutorial2) C++14
Compilation error
0 ms 0 KB
int GetMax(int n, int[] A) {
  int a = -1;
  for (int i=0; i<n; i++) if (a > A[i]) a = A[i];
  return a;
}

Compilation message

tutorial2.cpp:1:25: error: expected ',' or '...' before 'A'
 int GetMax(int n, int[] A) {
                         ^
tutorial2.cpp: In function 'int GetMax(int, int*)':
tutorial2.cpp:3:35: error: 'A' was not declared in this scope
   for (int i=0; i<n; i++) if (a > A[i]) a = A[i];
                                   ^