#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, dk, q, vn, a[N], nmax;
struct st {
  int v, pos;
} s[N];
bool cmp1(st a, st b) { return a.v > b.v; }
int v[N], fa[N], t[N], siz[N];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void update(int k, int f) { nmax += f * max(0, min(v[k], siz[k] - dk + 1)); }
void insert(int k) {
  v[k] = t[k] = siz[k] = 1;
  if (t[k - 1]) {
    update(find(k - 1), -1);
    siz[k] += siz[fa[k - 1]], v[k] += v[fa[k - 1]], fa[fa[k - 1]] = k;
  }
  if (t[k + 1]) {
    update(find(k + 1), -1);
    siz[k] += siz[fa[k + 1]], v[k] += v[fa[k + 1]], fa[fa[k + 1]] = k;
  }
  update(find(k), 1);
}
void erase(int k) {
  update(find(k), -1);
  v[fa[k]]--;
  update(fa[k], 1);
  t[k] = 2;
}
bool judge() {
  int l, r = 0;
  nmax = 0;
  for (int i = 1; i <= n; i++) fa[i] = i, v[i] = t[i] = 0;
  for (l = 1; l <= n; erase(s[l++].pos)) {
    while (s[l].v - s[r + 1].v <= vn && r < n) {
      insert(s[++r].pos);
    }
    if (nmax >= q) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d%d", &n, &dk, &q);
  int l = 1, r = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    r = max(r, a[i]);
  }
  for (int i = 1; i <= n; i++) s[i] = (st){a[i], i};
  sort(s + 1, s + n + 1, cmp1);
  while (l < r) {
    vn = (l + r) >> 1;
    if (judge())
      r = vn;
    else
      l = vn + 1;
  }
  while (!judge()) {
    vn++;
  }
  while (1 && vn > 1) {
    vn--;
    if (!judge()) {
      vn++;
      break;
    }
  }
  printf("%d", l);
  return 0;
}
