- Get Lowest Free solution codechef

Chef goes to the supermarket to buy some items. Luckily there’s a sale going on under which Chef gets the following offer:

- If Chef buys 33 items then he gets the item (out of those 33 items) having the lowest price as free.

For e.g. if Chef bought 33 items with the cost 66, 22 and 44, then he would get the item with cost 22 as free. So he would only have to pay the cost of the other two items which will be 6+4=106+4=10.

Chef buys 33 items having prices AA, BB and CC respectively. What is the amount of money Chef needs to pay?

Each test contains multiple test cases. The first line contains a single integer 𝑡t (1≤𝑡≤1041≤t≤104) — the number of test cases. Descriptions of test cases follow.

The first line of each test case contains three integers 𝑛n, 𝑙l, 𝑘k (2≤𝑘≤𝑙≤𝑛≤500002≤k≤l≤n≤50000, 𝑘≤20k≤20).

## Get Lowest Free solution codechef

Each of the next 𝑛n lines contains two integers 𝑥𝑖xi, 𝑦𝑖yi (−108≤𝑥𝑖,𝑦𝑖≤108−108≤xi,yi≤108) — the coordinates of the point 𝐴𝑖Ai. It is guaranteed that all points are distinct and were generated independently from uniform distribution on [−108,108]×[−108,108][−108,108]×[−108,108].

It is guaranteed that the sum of 𝑛n for all test cases does not exceed 5000050000.

In the first test, points were not generated from the uniform distribution on [−108,108]×[−108,108][−108,108]×[−108,108] for simplicity. It is the only such test and your solution must pass it.

Hacks are disabled in this problem.

#### Output

For each test case print a single real number — the answer to the problem.

Your answer will be considered correct if its absolute or relative error does not exceed 10−910−9. Formally let your answer be 𝑎a, jury answer be 𝑏b. Your answer will be considered correct if |𝑎−𝑏|max(1,|𝑏|)≤10−9|a−b|max(1,|b|)≤10−9.

## Get Lowest Free solution codechef

```
3
6 2 4
3 3 3
8 4 4
```

### Sample Output 1

```
10
6
12
```

### Get Lowest Free solution codechef

**Test case-1:** Explained in the problem statement.

**Test case-2:** Since all the three items have the same price, Chef will get one of them free and will have to pay the cost of the other two items which will be 3+3=63+3=6.

**Test case-3:** Chef will get one of the items having price 44 as free and will have to pay the cost of the other two items which will be 8+4=128+4=12.