제출 #224527

#제출 시각아이디문제언어결과실행 시간메모리
224527T0p_Rice Hub (IOI11_ricehub)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> // #include "ricehub.h" using namespace std; int besthub(int R, int L, int X[], long long B) { int ans = 0; for(int i=0 ; i<R ; i++) { long long temp = B; int now = 1, j = i+1; while(j < R) { if(temp < X[j] - X[i]) break ; temp -= X[j] - X[i]; j++; now++; } ans = max(ans, now); } return ans; } int arr[] = {1, 2, 10, 12, 14}; int main() { cout << besthub(5, 20, arr, 6ll) << endl; }

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

/tmp/cc105g2Q.o: In function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'
/tmp/ccf07Vs8.o:ricehub.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status