Logo
(追記) (追記ここまで)

26286번 - Football 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 (추가 시간 없음) 1024 MB2931275128.814%

문제

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 "$x$:$y$" means that the team we observe scored $x$ goals and conceded $y$ goals. If $x = y,ドル then the match ends in a draw. If $x > y,ドル then the observed team wins, and if $x < 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 ($n$), the number of goals scored in these matches ($a$), and the number of goals conceded in these matches ($b$).

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 $n$ --- the number of matches played by the team (1ドル \le n \le 100$). The second line contains an integer $a$ --- the total number of goals scored by the team in all $n$ matches (0ドル \le a \le 1000$). The third line contains an integer $b$ --- the total number of goals conceded by the team in all $n$ matches (0ドル \le b \le 1000$).

출력

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

In the following $n$ lines, print a list of match scores, each line in the format "$x$:$y$", where $x$ is the number of goals scored in the match, and $y$ -- the number of goals conceded, so that exactly $d$ of these matches have ended in a draw. In case multiple such lists of match scores exist, print any of them.

제한

예제 입력 1

3
2
4

예제 출력 1

0
1:0
1:2
0:2

예제 입력 2

1
2
2

예제 출력 2

1
2:2

예제 입력 3

4
0
7

예제 출력 3

0
0:1
0:2
0:1
0:3

예제 입력 4

6
3
1

예제 출력 4

2
0:0
1:0
0:0
0:1
1:0
1:0

힌트

출처

ICPC > Regionals > Northern Eurasia > Northern Eurasia Finals > Northern Eurasia Finals 2022 F번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /