#include <bits/stdc++.h>
#define int long long
using namespace std;
const int sz = 3e5 + 9;
int a[sz];
int n, p, q;
map<tuple<int, int, int>, bool> cache;
bool dfs(int idx, int p1, int q1, int w)
{
if (idx >= n)
{
return 1;
}
if (p1 + q1 == 0)
{
return 0;
}
auto key = tuple(idx, p1, q1);
if (cache.find(key) != cache.end())
{
return cache[key];
}
bool flag = 0;
if (p1 > 0)
{
int j = upper_bound(a, a + n, a[idx] + w - 1) - a;
flag |= dfs(j, p1 - 1, q1, w);
}
if (q1 > 0)
{
int j = upper_bound(a, a + n, a[idx] + 2 * w - 1) - a;
flag |= dfs(j, p1, q1 - 1, w);
}
return cache[key] = flag;
}
bool f(int w)
{
cache.clear();
return dfs(0, p, q, w);
}
signed main()
{
ios_base::sync_with_stdio(0);
cin.tie(nullptr);
cin >> n >> p >> q;
for (int i = 0; i < n; ++i)
{
cin >> a[i];
}
sort(a, a + n);
int l = 1, r = 1e9, best = r, mid;
while (l <= r)
{
mid = (l + r) >> 1;
if (f(mid))
{
best = mid;
r = mid - 1;
}
else
{
l = mid + 1;
}
}
cout << best << '\n';
}
//