Submission #145769

#TimeUsernameProblemLanguageResultExecution timeMemory
145769junseo최댓값 (tutorial2)C++17
100 / 100
3 ms504 KiB
#include <bits/stdc++.h>
using namespace std;

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:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i = 0; i < N; ++i)
     ^~~
tutorial2.cpp:8:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  return mx;
  ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...