#K13531. Drone Delivery Total Distance Calculation
Drone Delivery Total Distance Calculation
Drone Delivery Total Distance Calculation
This problem involves calculating the total distance that a delivery drone has to travel for multiple test cases. For each test case, you are given a number of delivery points with their coordinates. The drone always starts at the docking station (located at the origin \( (0,0) \)), visits each delivery point individually and returns back to the docking station after each delivery.
The distance covered for each delivery point located at \( (x,y) \) is given by \(2(|x| + |y|)\). The goal is to compute the total distance the drone travels for all deliveries in each test case.
inputFormat
The first line of input contains an integer \(T\) representing the number of test cases. For each test case, the first line contains an integer \(N\) indicating the number of delivery points. This is followed by \(N\) lines, each containing two space-separated integers \(x\) and \(y\), the coordinates of a delivery point.
Input Format:
T N x y x y ... (N times) ... (repeat for next test case)
outputFormat
For each test case, output a single line containing the total minimum distance the drone will travel to complete all deliveries and return to the docking station after each trip.
## sample1
3
1 1
2 2
3 3
24