Submission #148349

#TimeUsernameProblemLanguageResultExecution timeMemory
148349sg1774최댓값 (tutorial2)C++11
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int a[200]; int main(){ int z,s=0; scanf("%d",&z); for(int i=0;i<z;i++){ scanf("%d",&a[i]); s=max(s,a[i]); } printf("%d",s); return 0; }

Compilation message (stderr)

tutorial2.cpp: In function 'int main()':
tutorial2.cpp:6:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d",&z);
     ~~~~~^~~~~~~~~
tutorial2.cpp:8:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         scanf("%d",&a[i]);
         ~~~~~^~~~~~~~~~~~
/tmp/ccL9ne5u.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccRL88U5.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccRL88U5.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: error: ld returned 1 exit status