Submission #145775

#TimeUsernameProblemLanguageResultExecution timeMemory
145775xxxxorb0221최댓값 (tutorial2)C++14
Compilation error
0 ms0 KiB
#include<cstdio> #include<algorithm> using namespace std; int Getmax(int n,int[] arr){ int ans=arr[0]; for(int i=0;i<n;i++) ans=max(ans,arr[i]); return ans; }

Compilation message (stderr)

tutorial2.cpp:4:24: error: expected ',' or '...' before 'arr'
 int Getmax(int n,int[] arr){
                        ^~~
tutorial2.cpp: In function 'int Getmax(int, int*)':
tutorial2.cpp:5:11: error: 'arr' was not declared in this scope
   int ans=arr[0];
           ^~~