#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 = 2e2 + 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 dp[siz][siz][siz];
bool check(int w) {
memset(dp, false, sizeof(dp));
dp[0][0][0] = true;
rep (i, 1, n) {
/// dùng cây cọ có độ dài w thì ta có thể vươn tới
int j_1 = lower_bound(p + 1, p + n + 1, p[i] - w + 1) - p - 1;
/// dùng cây cọ có độ dài w * 2 thì ta có thể vươn tới
int j_2 = lower_bound(p + 1, p + n + 1, p[i] - 2 * w + 1) - p - 1;
rep (x, 0, a) rep (y, 0, b) {
if (x > 0) {
dp[i][x][y] |= dp[j_1][x - 1][y];
}
if (y > 0) {
dp[i][x][y] |= dp[j_2][x][y - 1];
}
}
}
rep (x, 0, a) rep (y, 0, b) {
if (dp[n][x][y]) {
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;
r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CiAgICB9CgogICAgcmV0dXJuIGZhbHNlOwp9CgpzaWduZWQgbWFpbigpIHsKICAgIGlvczo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsKICAgIGNpbi50aWUobnVsbHB0cik7CgogICAgaWYgKGZvcGVuKChmaWxlICsgIi5pbnAiKS5jX3N0cigpLCAiciIpKSB7CiAgICAgICAgZnJlb3BlbigoZmlsZSArICIuaW5wIikuY19zdHIoKSwgInIiLCBzdGRpbik7CiAgICAgICAgZnJlb3BlbigoZmlsZSArICIub3V0IikuY19zdHIoKSwgInciLCBzdGRvdXQpOwogICAgfQoKICAgIGNpbiA+PiBuID4+IGEgPj4gYjsKCiAgICByZXAgKGksIDEsIG4pIHsKICAgICAgICBjaW4gPj4gcFtpXTsKICAgIH0KCiAgICBpZiAoYSArIGIgPj0gbikgewogICAgICAgIGNvdXQgPDwgMSA8PCAiXG4iOwogICAgICAgIHJldHVybiAwOwogICAgfQoKICAgIHNvcnQocCArIDEsIHAgKyBuICsgMSk7CgogICAgaW50IGFucyA9IC0xOwogICAgZm9yIChpbnQgbGIgPSAxLCByYiA9IDFlOTsgbGIgPD0gcmI7ICkgewogICAgICAgIGludCBtYiA9IChsYiArIHJiKSAvIDI7CgogICAgICAgIGlmIChjaGVjayhtYikpIHsKICAgICAgICAgICAgYW5zID0gbWI7CiAgICAgICAgICAgIHJiID0gbWIgLSAxOwogICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgIGxiID0gbWIgKyAxOwogICAgICAgIH0KICAgIH0KCiAgICBjb3V0IDw8IGFucyA8PCAiXG4iOwoKLy8gICAgY2VyciA8PCAiVGltZTogIiA8PCAxMDAwICogY2xvY2soKSAvIENMT0NLU19QRVJfU0VDIDw8ICIgbXNcbiI7CgogICAgcmV0dXJuIDA7Cn0K