Program for recursive finding kth smallest element in array.
- integer 1<=n<=106: number of sets
- n integers 1<=ai<=106: elements of array
- integer 1<=m<=100: number of requests for kth element
- m integers 1<=kj<=106: kth element to find
For each set:
ki and found value when kth element exists
or
ki and word 'brak' otherwise
3
5
1 2 3 4 5
3
1 2 3
5
5 3 4 4 3
5
2 5 1 3 4
10
1 1 1 1 1 1 1 1 1 1
5
1 10 0 -1 11
1 1
2 2
3 3
2 3
5 5
1 3
3 4
4 4
1 1
10 1
0 brak
-1 brak
11 brak