A crab-porridge shop runs two kinds of delivery to help its neighbors. One is a paid order, delivered to a paying customer, and the other is a free meal, delivered at no charge to a student in need.
The shop has only one courier, so that single courier handles both the paid orders and the free meals. The owner insists on a first-come, first-served rule for the delivery order:
For example, if orders arrive as A,B,C and free-meal requests arrive as X,Y,Z, then B must be delivered after A and before C, but its timing relative to X,Y,Z does not matter.
The courier starts at the shop, whose location is (0,0). Find the shortest total distance the courier must travel to complete every delivery. The distance between two points is the Euclidean (straight-line) distance on the plane, and the courier does not need to return to the shop after the last delivery.
Input is given through standard input.
The first line contains the number of test cases T (1≤T≤20).
The first line of each test case contains the number of paid orders N (1≤N≤20) and the number of free-meal requests M (1≤M≤20), separated by a single space.
The next N lines give the coordinates of the paid-order destinations, one per line, in the order the orders were placed. The following M lines give the coordinates of the free-meal destinations, one per line, in the order the requests were made.
Each coordinate consists of two integers x and y (0≤x≤100, 0≤y≤100), separated by a single space.
For each test case, print on its own line the shortest total distance one courier needs to complete both kinds of delivery.
Round the value at the second decimal place and print it to one decimal place.