Submission #8561

#TimeUsernameProblemLanguageResultExecution timeMemory
8561a555최댓값 (tutorial2)C++98
Compilation error
0 ms0 KiB
#include <iostream> #include <iomanip> #include <stdlib.h> #include <stdio.h> #include <cstring> #include <cstdlib> #include <ctime> #include <algorithm> #include <string> #include <vector> #include <stack> #include <queue> #include <map> #include <math.h> #include <bitset> #include <numeric> #pragma warning(disable:4996) #define REP(variable, repeatnumber) for(int variable=0; variable<(repeatnumber); ++variable) #define FOR(variable, start, end) for(int variable=(start); variable<=(end); ++variable) #define RFOR(variable, start, end) for(int variable=(start); variable>=(end); --variable) #define ULL unsigned long long #define LL long long using namespace std; // 700B int n, k, b = 0; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &k); if (b < k)b = k; } printf("%d\n", b); return 0; }

Compilation message (stderr)

tutorial2.cpp:20:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
tutorial2.cpp: In function 'int main()':
tutorial2.cpp:33:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
tutorial2.cpp:35:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccj1bwMP.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccBU1256.o:grader.cpp:(.text.startup+0x0): first defined here
/tmp/ccBU1256.o: In function `main':
grader.cpp:(.text.startup+0x97): undefined reference to `GetMax(int, int*)'
collect2: ld returned 1 exit status