#P12795. [NERC 2022] Football

    ID: 12575 Type: RemoteJudge 3000ms 1024MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>2022Special JudgeICPCNERC/NEERC

[NERC 2022] Football

题目描述

Scientists are researching an impact of football match results on the mood of football fans. They have a hypothesis that there is a correlation between the number of draws and fans' desire to watch football matches in the future.

In football, two teams play a match. The teams score goals throughout a match. A score "xx :\tt{:} yy" means that the team we observe scored xx goals and conceded yy goals. If x=yx = y, then the match ends in a draw. If x>yx > y, then the observed team wins, and if x<yx < y, then it loses.

To find out if there is a correlation, the scientists gathered information about the results of teams in lower leagues. The information they found is the number of matches played by the team (nn), the number of goals scored in these matches (aa), and the number of goals conceded in these matches (bb).

You are given this information for a single team. You are asked to calculate the minimum number of draws that could have happened during the team's matches and provide a list of match scores with the minimum number of draws.

输入格式

The first line contains an integer nn --- the number of matches played by the team (1n1001 \le n \le 100). The second line contains an integer aa --- the total number of goals scored by the team in all nn matches (0a10000 \le a \le 1000). The third line contains an integer bb --- the total number of goals conceded by the team in all nn matches (0b10000 \le b \le 1000).

输出格式

In the first line, print a single integer dd --- the minimum number of draws.

In the following nn lines, print a list of match scores, each line in the format "xx :\tt{:} yy", where xx is the number of goals scored in the match, and yy -- the number of goals conceded, so that exactly dd of these matches have ended in a draw. In case multiple such lists of match scores exist, print any of them.

3
2
4
0
1:0
1:2
0:2
1
2
2
1
2:2
4
0
7
0
0:1
0:2
0:1
0:3
6
3
1
2
0:0
1:0
0:0
0:1
1:0
1:0