#include <bits/stdc++.h>
using namespace std;
long long n, k, Q;
long long a[2005];
bool check(long long x) {
  for (int i = 1; i <= n; i++) {
    long long l = a[i], r = l + x, ret = 0, cnt = 0, len = 0;
    for (int j = 1; j <= n; j++) {
      if (a[j] < l) {
        ret += min(len - k + 1, cnt);
        len = cnt = 0;
      } else {
        len++;
        if (a[j] <= r) cnt++;
      }
    }
    ret += min(len - k + 1, cnt);
    if (ret >= Q) return true;
  }
  return false;
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> Q;
  for (int i = 1; i <= n; i++) cin >> a[i];
  long long ub = 1e9 + 7, lb = -1, mid;
  while (ub - lb > 1) {
    mid = (ub + lb) / 2;
    if (check(mid))
      ub = mid;
    else
      lb = mid;
  }
  cout << ub << endl;
  return 0;
}
