CodeChef::Bowlers(Incorrect)
#include <bits/stdc++.h>
#define boost ios::sync_with_stdio(0);cin.tie(0)
using namespace std ;
int main (){
boost ;
long long int t ;
cin >> t ;
while (t--)
{
long long int n,k,l ;
cin >> n >> k >> l ;
long long int temp = k ;
if(k * l < n) cout << -1 << '\n';
else
{
long long int arr[n];
for (long long int i = 0; i < n; i++)
{
if(k == 0) k = temp ;
arr[i] = k ;
k -- ;
}
for (long long int i = 0; i < n; i++)
{
cout << arr[i] << " " ;
}
cout << '\n' ;
}
}
return 0 ;
}
Comments
Post a Comment