Football
면접 대비시간 제한3초메모리 제한1024 MB
n경기의 총 득점 a와 총 실점 b가 주어질 때 무승부 수의 최솟값을 구하고, 그에 맞는 경기별 점수를 하나 출력한다.
문제
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.