Submission #1110228

#TimeUsernameProblemLanguageResultExecution timeMemory
1110228dung3683833Rice Hub (IOI11_ricehub)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5 +5 ; int a[N]; signed main() { int n, l, k; cin >> n >> l >> k; for (int i = 1; i <= n; i++) cin >> a[i]; // sort(a+1, a+n+1); int ma = 0; for (int i = 1; i <= n; i++) { int pos = upper_bound(a+i+1, a+n+1, a[i] + k) - a - 1; ma = max(ma, pos - i + 1); } cout << ma; return 0; }

Compilation message (stderr)

/usr/bin/ld: /tmp/ccISDuKU.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc2H1CsT.o:ricehub.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccISDuKU.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