Splitting a Season in Half
Marchmont Rovers' analyst writes a two-part note at the end of every season: how the side went early on, and how it went once the fixtures got hard. The club's convention is a plain calendar split — the first half of the season is the first half of the games as they were played, and the second half is the rest. The scores are filed in the order the games were played, and the season always has an even number of games, so the two halves are the same length.
Task: Print the season's scores as two halves.
Input
The first line holds an integer n, the number of games played, which is even. Each of the next n lines holds one game's score, in the order the games were played.
Output
Two lines. The first holds the scores from the first half of the season, the second holds the scores from the second half, each in the order the games were played and separated by single spaces. Write each score as a plain integer.
Example:
Input:
4
10
20
30
40
Output:
10 20
30 40
Sign in to solve this problem
Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.
Sign in