제출 #1264261

#제출 시각아이디문제언어결과실행 시간메모리
1264261liangjeremyRice Hub (IOI11_ricehub)C++20
컴파일 에러
0 ms0 KiB
#include "ricehub.h" #include<bits/stdc++.h> #define fi first #define se second //#define int long long using namespace std; using db=double; using ll=int64_t; using sll=__int128; using lb=long double; int besthub(int r, int l, int x[], ll b){ int ans=0; for(int i=1; i<=l; i++){ vector<int>v; int rem=b; int cur=0; for(int j=0; j<r; j++){ v.push_back(abs(i-x[j])); } sort(v.begin(),v.end()); for(auto x:v){ if(rem>=x){ rem-=x; cur++; } } ans=max(ans,cur); } return ans; }

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

/usr/bin/ld: /tmp/ccaiMDCe.o: in function `main':
grader.cpp:(.text.startup+0xaa): undefined reference to `besthub(int, int, int*, long long)'
collect2: error: ld returned 1 exit status