#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, k, q;
int a[N];
bool solve(int len) {
  for (int i = 0; i < n; ++i) {
    int min_val = a[i];
    int max_val = a[i] + len;
    int sum = 0;
    int aa = 0;
    int bb = 0;
    for (int j = 0; j <= n; ++j) {
      if (a[j] < min_val) {
        sum += min(aa + bb - k + 1, aa);
        aa = 0;
        bb = 0;
      } else if (a[j] <= max_val) {
        aa++;
      } else {
        bb++;
      }
    }
    if (sum >= q) return true;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> q;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  int mans = 1e9 + 5;
  int l = 0;
  int r = 1e9;
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (solve(mid)) {
      mans = mid;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << mans << endl;
  return 0;
}
