#include<iostream>
#include<cstdio>
using namespace std;
int main() {
	int n,m,q,a[2005];
	scanf("%d%d%d",&n,&m,&q);
	for (register int i=1;i<=n;++i) {
		scanf("%d",a+i);
	}
	int l=0,r=2000000000;
	while (l<r) {
		int mid=(l+r)>>1;
		bool ok=0;
		for (register int i=1;i<=n;++i) {
			int p=a[i],k=0,tmp=0,cnt=0;
			for (register int j=1;j<=n+1;++j) {
				if (a[j]<p||j==n+1) {
					tmp+=j-k-1<m?0:min(j-k-1-m+1,j-k-1-cnt);
					k=j;
					cnt=0;
				}
				else if (a[j]>p+mid) {
					++cnt;
				}
			}
			if (tmp>=q) {
				ok=1;
				break;
			}
		}
		ok?r=mid:l=mid+1;
	}
	printf("%d",l);
	return 0;
}
