Submission #19420

#TimeUsernameProblemLanguageResultExecution timeMemory
19420dotorya최댓값 (tutorial2)C++14
Compilation error
0 ms0 KiB
#include <algorithm> #include <assert.h> #include <complex> #include <ctype.h> #include <functional> #include <iostream> #include <limits.h> #include <locale.h> #include <map> #include <math.h> #include <queue> #include <set> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <vector> #include <unordered_set> #include <unordered_map> #pragma warning(disable:4996) using namespace std; #define mp make_pair typedef long long ll; typedef unsigned long long ull; typedef double db; typedef long double ldb; typedef pair <int, int> pii; typedef pair <ll, ll> pll; typedef pair <ll, int> pli; typedef pair <ldb, ldb> pdd; int IT_MAX = 131072; const ll MOD = 1000000007; const int INF = 1034567891; const ll LL_INF = 2234567890123456789ll; const db PI = 3.141592653589793238; const ldb ERR = 1E-10; int main() { int N, i, ans = -INF; scanf("%d", &N); while (N--) { scanf("%d", &i); ans = max(ans, i); } return !printf("%d\n", ans); }

Compilation message (stderr)

tutorial2.cpp:21:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
 #pragma warning(disable:4996)
 ^
tutorial2.cpp: In function ‘int main()’:
tutorial2.cpp:43:17: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &N);
                 ^
tutorial2.cpp:45:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d", &i);
                  ^
/tmp/cc1gNFzF.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/cc4RXnXZ.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/cc4RXnXZ.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: error: ld returned 1 exit status