Submission #1632

#TimeUsernameProblemLanguageResultExecution timeMemory
1632gs13057최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include<cstdio> #include<assert.h> #include<malloc.h> int GetMax(int N,int *A); int main(void){ int i,tmp; int N; tmp=scanf("%d", &N); assert(tmp==1); int *A=(int*)malloc(sizeof(int)*N); for(i=0;i<N;i++){ tmp=scanf("%d",&A[i]); assert(tmp == 1); } printf("%d\n", GetMax(N, A)); return 0; } int GetMax(int N,int *A){ int res=0; for(int i=0;i<N;i++) if(A[i]>res) res=A[i]; return res; }

Compilation message (stderr)

/tmp/cc5ZcafV.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccP8hKni.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: ld returned 1 exit status