-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathBOWLERS.java
More file actions
34 lines (31 loc) · 928 Bytes
/
Copy pathBOWLERS.java
File metadata and controls
34 lines (31 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import java.util.*;
class Codechef {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int t = sc.nextInt();
for (int q = 0; q < t; q++) {
int n = sc.nextInt();
int k = sc.nextInt();
int l = sc.nextInt();
if (n > k * l) {
System.out.println("-1");
}
else if(k==1 && n>1){
System.out.println("-1");
}
else {
int temp = n / k;
for (int j = 0; j < temp; j++) {
for (int i = 1; i <= k; i++) {
System.out.print(i + " ");
}
}
int tt = n%k;
for(int i=1; i<=tt; i++){
System.out.print(i + " ");
}
System.out.println();
}
}
}
}