SP181 SCUBADIV - Scuba diver
Description
A scuba diver uses a special equipment for diving. He has a cylinder with two containers: one with oxygen and the other with nitrogen. Depending on the time he wants to stay under water and the depth of diving the scuba diver needs various amount of oxygen and nitrogen. The scuba diver has at his disposal a certain number of cylinders. Each cylinder can be described by its weight and the volume of gas it contains. In order to complete his task the scuba diver needs specific amount of oxygen and nitrogen. What is the minimal total weight of cylinders he has to take to complete the task?
Input Format
The number of test cases _c_ is in the first line of input, then _c_ test cases follow separated by an empty line.
In the first line of a test case there are two integers _t_, _a_ separated by a single space, 1
Output Format
For each test case your program should output one line with the minimal total weight of cylinders the scuba diver should take to complete the task.