The Game
Time limit1sMemory limit512 MB
Given a final score x:y where one team reached k points, reconstruct any valid sequence of scores after each question.
- Level
Easy3 of 10
- Topics
- Greedy, Implementation, Simulation
- Solved
- No attempts yet
Problem
The intellectual TV game "What? Where? When?" is very popular. Throughout the game, a team of experts tries to answer questions sent in by viewers. If the experts answer a question correctly, the team of experts gets one point; otherwise, the team of viewers gets one point. The game ends when one of the teams reaches points.
You are given a final score of . The game therefore consisted of questions, and one of the teams scored exactly points. You are not given , since you can compute it easily. Find any valid game scenario that ended with the score , as the list of scores after each question.
The score you are given is correct, and at least one question was asked.
Input
The first line contains two integers and , the final score (; ).
Output
Print lines. The -th line contains the score after the -th round. Separate the two point totals with the colon character (':'). You may print any game scenario that ends with the score .