#P12795. [NERC 2022] Football
[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 " " means that the team we observe scored goals and conceded goals. If , then the match ends in a draw. If , then the observed team wins, and if , 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 (), the number of goals scored in these matches (), and the number of goals conceded in these matches ().
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 --- the number of matches played by the team (). The second line contains an integer --- the total number of goals scored by the team in all matches (). The third line contains an integer --- the total number of goals conceded by the team in all matches ().
输出格式
In the first line, print a single integer --- the minimum number of draws.
In the following lines, print a list of match scores, each line in the format " ", where is the number of goals scored in the match, and -- the number of goals conceded, so that exactly 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