제출 #113203

#제출 시각아이디문제언어결과실행 시간메모리
113203ecksdee쌀 창고 (IOI11_ricehub)C++11
컴파일 에러
0 ms0 KiB
#include "ricehub.h" #include <bits/stdc++.h> using namespace std; int besthub(int R, int L, int X[], int B) { int maxim[R]; memset(maxim, 1, sizeof(maxim)); for (int i = 0; i < R; i++) { for (int x = i; x < R; x++) { if ((maxim[i] + (X[x] - X[i])) < B) { maxim[i] ++; } } } sort(maxim, maxim+R, greater<int>()); return maxim[0]; } int main() { int R, L, B; int X[5]; cin >> R >> L >> B; for (int i = 0; i < R; i++) { cin >> X[i]; } cout << besthub(R, L, X, B); }

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

/tmp/ccGM0Rev.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccBSk263.o:ricehub.cpp:(.text.startup+0x0): first defined here
/tmp/ccGM0Rev.o: In function `main':
grader.cpp:(.text.startup+0x92): undefined reference to `besthub(int, int, int*, long long)'
collect2: error: ld returned 1 exit status