Submission #8825

#TimeUsernameProblemLanguageResultExecution timeMemory
8825xiaoyu최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> #include <string.h> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <iostream> #include <sstream> #include <algorithm> #include <math.h> #include <time.h> #include <float.h> #include <assert.h> #include <stack> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define FORE(i,a,b) for(int i=(a);i<=(b);++i) #define REPE(i,n) FORE(i,0,n) #define S(v) ((int)v.size()) #define LL long long #define ULL unsigned long long #define ALL(v) (v).begin(), (v).end() typedef vector<int> VI; int main() { #ifdef WIN32 //freopen("input.txt","r",stdin); #endif int n; scanf("%d", &n); vector<int> v(n); REP(i,n)scanf("%d",&v[i]); printf("%d\n", *max_element(ALL(v))); return 0; }

Compilation message (stderr)

tutorial2.cpp: In function 'int main()':
tutorial2.cpp:36:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
tutorial2.cpp:38:27: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccgoFCqb.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccqgSfoF.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccqgSfoF.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: ld returned 1 exit status