#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];
int dp[siz][siz];
bool check(int w) {
memset(dp, 0x3f, sizeof(dp));
dp[0][0] = 0;
rep (i, 1, n) {
int j_1 = lower_bound(p + 1, p + n + 1, p[i] - w + 1) - p - 1;
int j_2 = lower_bound(p + 1, p + n + 1, p[i] - 2 * w + 1) - p - 1;
rep (k, 0, a) {
if (k > 0) {
minimize(dp[i][k], dp[j_1][k - 1]);
}
minimize(dp[i][k], dp[j_2][k] + 1);
}
}
rep (k, 0, a) {
/// dp[n][k] = y
/// dp[p1, p2, ..., pn][ k cái cọ w] = true và y cái cọ w * 2
if (dp[n][k] <= b) {
return true;
}
}
return false;
}
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;
}
sort(p + 1, p + n + 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 <<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NvbnN0IHN0cmluZyBmaWxlID0gInBhaW50IjsKCmludCBuLCBhLCBiOwppbnQgcFtzaXpdOwppbnQgZHBbc2l6XVtzaXpdOwoKYm9vbCBjaGVjayhpbnQgdykgewogICAgbWVtc2V0KGRwLCAweDNmLCBzaXplb2YoZHApKTsKICAgIGRwWzBdWzBdID0gMDsKICAgIHJlcCAoaSwgMSwgbikgewogICAgICAgIGludCBqXzEgPSBsb3dlcl9ib3VuZChwICsgMSwgcCArIG4gKyAxLCBwW2ldIC0gdyArIDEpIC0gcCAtIDE7CgogICAgICAgIGludCBqXzIgPSBsb3dlcl9ib3VuZChwICsgMSwgcCArIG4gKyAxLCBwW2ldIC0gMiAqIHcgKyAxKSAtIHAgLSAxOwoKICAgICAgICByZXAgKGssIDAsIGEpIHsKICAgICAgICAgICAgaWYgKGsgPiAwKSB7CiAgICAgICAgICAgICAgICBtaW5pbWl6ZShkcFtpXVtrXSwgZHBbal8xXVtrIC0gMV0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIG1pbmltaXplKGRwW2ldW2tdLCBkcFtqXzJdW2tdICsgMSk7CiAgICAgICAgfQogICAgfQoKICAgIHJlcCAoaywgMCwgYSkgewogICAgICAgIC8vLyBkcFtuXVtrXSA9IHkKICAgICAgICAvLy8gZHBbcDEsIHAyLCAuLi4sIHBuXVsgayBjw6FpIGPhu40gd10gID0gdHJ1ZSB2w6AgeSAgY8OhaSBj4buNIHcgKiAyCiAgICAgICAgaWYgKGRwW25dW2tdIDw9IGIpIHsKICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgfQogICAgfQoKICAgIHJldHVybiBmYWxzZTsKfQoKc2lnbmVkIG1haW4oKSB7CiAgICBpb3M6OnN5bmNfd2l0aF9zdGRpbyhmYWxzZSk7CiAgICBjaW4udGllKG51bGxwdHIpOwoKICAgIGlmIChmb3BlbigoZmlsZSArICIuaW5wIikuY19zdHIoKSwgInIiKSkgewogICAgICAgIGZyZW9wZW4oKGZpbGUgKyAiLmlucCIpLmNfc3RyKCksICJyIiwgc3RkaW4pOwogICAgICAgIGZyZW9wZW4oKGZpbGUgKyAiLm91dCIpLmNfc3RyKCksICJ3Iiwgc3Rkb3V0KTsKICAgIH0KCiAgICBjaW4gPj4gbiA+PiBhID4+IGI7CgogICAgcmVwIChpLCAxLCBuKSB7CiAgICAgICAgY2luID4+IHBbaV07CiAgICB9CgogICAgaWYgKGEgKyBiID49IG4pIHsKICAgICAgICBjb3V0IDw8IDEgPDwgIlxuIjsKICAgICAgICByZXR1cm4gMDsKICAgIH0KCiAgICBzb3J0KHAgKyAxLCBwICsgbiArIDEpOwoKICAgIGludCBhbnMgPSAtMTsKICAgIGZvciAoaW50IGxiID0gMSwgcmIgPSAxZTk7IGxiIDw9IHJiOyApIHsKICAgICAgICBpbnQgbWIgPSAobGIgKyByYikgLyAyOwoKICAgICAgICBpZiAoY2hlY2sobWIpKSB7CiAgICAgICAgICAgIGFucyA9IG1iOwogICAgICAgICAgICByYiA9IG1iIC0gMTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBsYiA9IG1iICsgMTsKICAgICAgICB9CiAgICB9CgogICAgY291dCA8PCBhbnMgPDwgIlxuIjsKCi8vICAgIGNlcnIgPDwgIlRpbWU6ICIgPDwgMTAwMCAqIGNsb2NrKCkgLyBDTE9DS1NfUEVSX1NFQyA8PCAiIG1zXG4iOwoKICAgIHJldHVybiAwOwp9Cgo=