Submission #502840

#TimeUsernameProblemLanguageResultExecution timeMemory
502840wind_reaperRice Hub (IOI11_ricehub)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "ricehub.h" using namespace std; int besthub(int R, int L, int X[], int64_t B){ int64_t temp = 0; int ans = 0; for(int l = 0, r = 0; l < R; l++){ while(r + 1 < R && temp + X[r + 1] - X[(l + r + 1) / 2] <= B){ temp += X[r + 1] - X[(l + r + 1)/2]; r++; ans = max(ans, r - l + 1); } temp += X[l] - X[(r + l + 1)/2]; } return ans; }

Compilation message (stderr)

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