Submission #145765

#TimeUsernameProblemLanguageResultExecution timeMemory
145765xxxxorb0221최댓값 (tutorial2)C++14
Compilation error
0 ms0 KiB
#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:3:25: error: expected ',' or '...' before '*' token
 int Getmax(int n,int arr*){
                         ^
tutorial2.cpp: In function 'int Getmax(int, int)':
tutorial2.cpp:4:16: error: invalid types 'int[int]' for array subscript
   int ans=arr[0];
                ^
tutorial2.cpp:6:22: error: invalid types 'int[int]' for array subscript
     ans=max(ans,arr[i]);
                      ^