欢迎来到起遇信息学
起遇信息学正处于上线筹建阶段,以下功能已全部开放免费体验: ✅ 完整题库浏览与代码提交评测(C / C++ / Python / Java 等) ✅ 入门到进阶的系列课程试读、作业与考试 ✅ AI 提示、AI 作业分析等智能助教功能 ✅ 赛事模拟与个人能力报告 ✅ 邮箱注册开放 ⏳ 付费课程订阅与微信/支付宝支付通道 ⏳ 手机号登录,微信扫码登录、微信公众号绑定 使用中如遇任何问题,欢迎通过页面底部 **"联系我们"** 与我们沟通。
CF1773F.Football
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.
Input
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 ().
Output
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.
Samples
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
在线编程 IDE
建议全屏模式获得最佳体验
| 进入全屏编程 | Alt+E |
| 递交评测 | Ctrl+Enter |
| 注释/取消注释 | Ctrl+/ |
| 缩放字体 | Ctrl+滚轮 |