#include <bits/stdc++.h>
using namespace std;
bool f(int mid, vector<int> &a, int n, int m, int k){
int total=0;
for(int i=0; i<n; i++){
if (m-i <= 0) break;
int min_steps=ceil(double(a[i])/(m-i));
if (min_steps <= mid) total++;
}
return total >= k;
}
int main() {
int t; cin>>t;
while(t--){
int n, m, k; cin>>n>>m>>k;
vector<int> a(n); for(int &i: a) cin>>i;
int l=1, h=1e9, res=-1;
while(l<=h){
int mid=l+(h-l)/2;
if (f(mid, a, n, m, k)) res=mid, h=mid-1;
else l=mid+1;
}
cout << res << endl;
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgpib29sIGYoaW50IG1pZCwgdmVjdG9yPGludD4gJmEsIGludCBuLCBpbnQgbSwgaW50IGspewogICAgaW50IHRvdGFsPTA7CiAgICBmb3IoaW50IGk9MDsgaTxuOyBpKyspewogICAgICAgIGlmIChtLWkgPD0gMCkgYnJlYWs7CiAgICAgICAgaW50IG1pbl9zdGVwcz1jZWlsKGRvdWJsZShhW2ldKS8obS1pKSk7CiAgICAgICAgaWYgKG1pbl9zdGVwcyA8PSBtaWQpIHRvdGFsKys7CiAgICB9CiAgICByZXR1cm4gdG90YWwgPj0gazsKfQoKaW50IG1haW4oKSB7CglpbnQgdDsgY2luPj50OwoJd2hpbGUodC0tKXsKCSAgICBpbnQgbiwgbSwgazsgY2luPj5uPj5tPj5rOwoJICAgIHZlY3RvcjxpbnQ+IGEobik7IGZvcihpbnQgJmk6IGEpIGNpbj4+aTsKCSAgICBpbnQgbD0xLCBoPTFlOSwgcmVzPS0xOwoJICAgIHdoaWxlKGw8PWgpewoJICAgICAgICBpbnQgbWlkPWwrKGgtbCkvMjsKCSAgICAgICAgaWYgKGYobWlkLCBhLCBuLCBtLCBrKSkgcmVzPW1pZCwgaD1taWQtMTsKCSAgICAgICAgZWxzZSBsPW1pZCsxOwoJICAgIH0KCSAgICBjb3V0IDw8IHJlcyA8PCBlbmRsOwoJfQp9Cg==