#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define mp make_pair
//#define int long long
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rep(i, l, r) for (int i = (int)(l); i <= (int)(r); i++)
#define per(i, r, l) for (int i = (int)(r); i >= (int)(l); i--)
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename _Tp> bool minimize(_Tp& __a, const _Tp& __b) { if (__a > __b) { __a = __b; return true; } return false; }
template<typename _Tp> bool maximize(_Tp& __a, const _Tp& __b) { if (__a < __b) { __a = __b; return true; } return false; }
const int siz = 2e3 + 2;
const int SIZ = 1e6 + 2;
const int mod = 1e9 + 7;
const int maxx = 2e9;
const ll MAXX = 1e18;
const string file = "paint";
int n, a, b;
int p[siz];
bool check(int w) {
int cnt = 0;
rep (i, 1, n) {
cnt++;
int j = i;
while (j < n && p[j + 1] - p[i] + 1 <= w) {
/// p[j] được tô
j++;
}
/// cây cọ p[i] -> p[i] + w - 1
/// do đó p[j] <= (p[i] + w - 1) sẽ được tô
/// p[j] - p[i] + 1 <= w
i = j;
}
return cnt <= a;
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
if (fopen((file + ".inp").c_str(), "r")) {
freopen((file + ".inp").c_str(), "r", stdin);
freopen((file + ".out").c_str(), "w", stdout);
}
cin >> n >> a >> b;
rep (i, 1, n) {
cin >> p[i];
}
if (a + b >= n) {
cout << 1 << "\n";
return 0;
}
/// các ô đặc biệt sẽ tăng dần
sort(p + 1, p + n + 1);
/// p[1] -> p[1] + w - 1
int ans = -1;
for (int lb = 1, rb = 1e9; lb <= rb; ) {
int mb = (lb + rb) / 2;
if (check(mb)) {
ans = mb;
rb = mb - 1;
} else {
lb = mb + 1;
}
}
cout << ans << "\n";
// cerr << "Time: " << 1000 * clock() / CLOCKS_PER_SEC << " ms\n";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgoj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A7CiAgICByZXAgKGksIDEsIG4pIHsKICAgICAgICBjbnQrKzsKICAgICAgICBpbnQgaiA9IGk7CgogICAgICAgIHdoaWxlIChqIDwgbiAmJiBwW2ogKyAxXSAtIHBbaV0gKyAxIDw9IHcpIHsKICAgICAgICAgICAgLy8vIHBbal0gIMSRxrDhu6NjIHTDtAogICAgICAgICAgICBqKys7CiAgICAgICAgfQogICAgICAgIC8vLyBjw6J5IGPhu40gcFtpXSAtPiBwW2ldICsgdyAtIDEKCiAgICAgICAgLy8vIGRvIMSRw7MgcFtqXSA8PSAocFtpXSArIHcgLSAxKSBz4bq9IMSRxrDhu6NjIHTDtAoKICAgICAgICAvLy8gcFtqXSAtIHBbaV0gKyAxIDw9IHcKCiAgICAgICAgaSA9IGo7CiAgICB9CgogICAgcmV0dXJuIGNudCA8PSBhOwp9CgpzaWduZWQgbWFpbigpIHsKICAgIGlvczo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUobnVsbHB0cik7CgogICAgaWYgKGZvcGVuKChmaWxlICsgIi5pbnAiKS5jX3N0cigpLCAiciIpKSB7CiAgICAgICAgZnJlb3BlbigoZmlsZSArICIuaW5wIikuY19zdHIoKSwgInIiLCBzdGRpbik7CiAgICAgICAgZnJlb3BlbigoZmlsZSArICIub3V0IikuY19zdHIoKSwgInciLCBzdGRvdXQpOwogICAgfQoKICAgIGNpbiA+PiBuID4+IGEgPj4gYjsKCiAgICByZXAgKGksIDEsIG4pIHsKICAgICAgICBjaW4gPj4gcFtpXTsKICAgIH0KCiAgICBpZiAoYSArIGIgPj0gbikgewogICAgICAgIGNvdXQgPDwgMSA8PCAiXG4iOwogICAgICAgIHJldHVybiAwOwogICAgfQoKICAgIC8vLyBjw6FjIMO0IMSR4bq3YyBiaeG7h3Qgc+G6vSB0xINuZyBk4bqnbgoKICAgIHNvcnQocCArIDEsIHAgKyBuICsgMSk7CgogICAgLy8vIHBbMV0gLT4gcFsxXSArIHcgLSAxCgogICAgaW50IGFucyA9IC0xOwogICAgZm9yIChpbnQgbGIgPSAxLCByYiA9IDFlOTsgbGIgPD0gcmI7ICkgewogICAgICAgIGludCBtYiA9IChsYiArIHJiKSAvIDI7CgogICAgICAgIGlmIChjaGVjayhtYikpIHsKICAgICAgICAgICAgYW5zID0gbWI7CiAgICAgICAgICAgIHJiID0gbWIgLSAxOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGxiID0gbWIgKyAxOwogICAgICAgIH0KICAgIH0KCiAgICBjb3V0IDw8IGFucyA8PCAiXG4iOwoKLy8gICAgY2VyciA8PCAiVGltZTogIiA8PCAxMDAwICogY2xvY2soKSAvIENMT0NLU19QRVJfU0VDIDw8ICIgbXNcbiI7CgogICAgcmV0dXJuIDA7Cn0K