#C6416. Transform Points on a 2D Plane

    ID: 50174 Type: Default 1000ms 256MiB

Transform Points on a 2D Plane

Transform Points on a 2D Plane

Given T test cases, each test case contains a set of points on a 2D plane. For each test case, you are required to transform each point so that the i-th point (using 0-indexing) is modified as follows:

$$x' = x + i, \quad y' = y - i$$

This transformation ensures that every point becomes distinct when shifted by its index. Implement a program that reads the input from standard input, applies the transformation to all test cases, and prints the transformed coordinates on standard output.

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 (the number of points).
  • Each of the next n lines contains two integers x and y representing the coordinates of a point.

outputFormat

For each test case, output a single line containing 2*n integers separated by spaces. These integers represent the transformed coordinates of the points in the same order as provided in the input, where each point is printed as x' y'.

## sample
1
3
1 1
2 3
3 2
1 1 3 2 5 0

</p>