제출 #8562

#제출 시각아이디문제언어결과실행 시간메모리
8562a555최댓값 (tutorial2)C++98
컴파일 에러
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, tb[11]; int GetMax(int N, int *A){ int b = 0; REP(i, n){ if (b < A[i]) b = A[i]; } return b; } int main() { scanf("%d", &n); REP(i,n) scanf("%d", &tb[i]); printf("%d\n", GetMax(n, tb)); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

tutorial2.cpp:20:0: warning: ignoring #pragma warning  [-Wunknown-pragmas]
tutorial2.cpp: In function 'int main()':
tutorial2.cpp:41:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
tutorial2.cpp:42:30: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
/tmp/ccHIVP0d.o: In function `main':
tutorial2.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccmaMB5W.o:grader.cpp:(.text.startup+0x0): first defined here
collect2: ld returned 1 exit status