#include <bits/stdc++.h>
using namespace std;
#define nitro ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define vi vector<int>
#define spc ' '
#define yes "YES"
#define no "NO"
#define endl "\n"
const int INF = 1e18;
const int maxn = 2e5 + 5;
const int mod = 1000000000;
const int logn = 20;
void solve() {
int n, p, q; cin >> n >> p >> q;
vi a(n);
for(auto &i : a) cin >> i;
sort(a.begin(), a.end());
a.erase(unique(a.begin(), a.end()), a.end());
n = a.size();
if(p + q >= n) {
cout << 1;
return;
}
int l = 0, r = a[n - 1] - a[0];
auto check = [a, n, p, q](int w) {
vector<vi> dp(2005, vi(2005, 0));
int nextp[2005], nextq[2005];
int r1 = 0, r2 = 0;
for(int i = 0; i < n; i++) {
while(r1 < n and a[r1] < a[i] + w) r1++;
nextp[i] = r1;
while(r2 < n and a[r2] < a[i] + 2LL * w) r2++;
nextq[i] = r2;
}
nextp[n] = nextq[n] = n;
for(int i = 0; i <= p; i++) {
for(int j = 0; j <= q; j++) {
if(i > 0) {
dp[i][j] = max(dp[i][j], nextp[dp[i - 1][j]]);
}
if(j > 0) {
dp[i][j] = max(dp[i][j], nextq[dp[i][j - 1]]);
}
if(dp[i][j] >= n) return true;
}
}
return false;
};
int ans;
while(l <= r) {
int m = (l + r) / 2;
if(check(m)) {
ans = r;
r = m - 1;
} else {
l = m + 1;
}
}
cout << ans;
}
signed main() {
// freopen("disrupt.in", "r", stdin);
// freopen("disrupt.out", "w", stdout);
nitro
int t = 1;
// cin >> t;
for(int i = 1; i <= t; i++) {
// cout << "Case #" << i << ": ";
solve();
cout << endl;
}
return 0;
}