#include <bits/stdc++.h>
using namespace std;
#define ll long long
map <int, int> m;
int besthub(int R, int L, int X[], int B) {
for (int i = 0; i < R; ++i) {
m[X[i]] = 1;
}
int jog = 0, op, ans;
for (int i = 1; i <= L; ++i) {
op = ans = 0;
for (int j = i; j <= L; ++j) {
op++;
if (op > B) break;
if (m.find (j) != m.end ()) {
ans++;
}
}
jog = max (jog, ans);
}
return jog;
}
//int main() {
// freopen("kk.txt", "r", stdin);
// int R, L;
// ll B;
// cin >> R >> L >> B;
// int X[R];
// for (int i = 0; i < R; ++i) {
// cin >> X[i];
// }
// cout << besthub (R, L, X, B);
//}
Compilation message
/usr/bin/ld: /tmp/ccrjQbga.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