#C2257. Calculate Final Points

    ID: 45553 Type: Default 1000ms 256MiB

Calculate Final Points

Calculate Final Points

Given \(T\) players, each player has an initial point value and a series of changes. For the \(i\)-th player, let \(I_i\) be the initial points and \(\Delta_{i1}, \Delta_{i2}, \ldots, \Delta_{in_i}\) be the changes. The final points for that player are computed as:

\[ \text{final}_i = I_i + \sum_{j=1}^{n_i} \Delta_{ij} \]

Your task is to write a program that reads the input from standard input, calculates the final points for each player, and outputs them to standard output.

inputFormat

The input is given via standard input and has the following format:

  1. The first line contains an integer \(T\) representing the number of players.
  2. Each of the next \(T\) lines contains data for one player. Each line begins with an integer representing the initial points, followed by an integer \(C\) which denotes the number of changes, and then \(C\) integers indicating the changes.

outputFormat

Output the final points for all players in one line, separated by a single space. The output should be written to standard output.

## sample
3
100 3 20 -10 30
50 2 -5 -15
200 4 50 50 -30 -20
140 30 250