407797: GYM102894 E The Curious Case Of Vasya
Description
Vasya had a burning desire to become a participant of the final stage of the All-Russian Olympiad in Informatics. He wanted it so much that he lied to his friend Petya that he had participated in it. What's more, he said to him: 'I got the $$$a$$$-th place on the first day, the $$$b$$$-th place on the second day, and the $$$c$$$-th in the final standings, and didn't share these places with anyone!'
Since Vasya had lied to Petya countless times, he didn't believe him and asked to show the standings table. Help Vasya come up with such a standings table that all three requirements that the had previously announced are satisfied (he cannot do it himself since he didn't score even a hundred points [out of 800] on the regional stage).
InputThe first line contains three integers $$$a, b, c$$$ $$$(1 \le a, b, c \le 50000)$$$ — Vasya's place on the first day, on the second day, and in the final standings (where participants are ranked by the sum of their daily results).
OutputIf it is impossible to construct the needed standings table, output -1.
If such a table exists, output $$$n$$$ ($$$n \le 5 \cdot 10 ^ 5$$$) on the first line — the number of participants. After that, on $$$n$$$ next lines, output three numbers: the $$$i + 1$$$-th line must contain the result of the $$$i$$$-th participant on the first day, on the second day and the total sum. You can output the results in any order. Vasya's position in all of the three columns must be unique. See the sample for better understanding.
Scoring№ | Points | Limits | Dependencies | Grading policy |
1 | 10 | $$$a = b = c$$$ | - | each test |
2 | 60 | $$$1 \le a, b, c \le 100$$$ | - | each test |
3 | 30 | $$$1 \le a, b, c \le 50000$$$ | - | each test |
4 1 2Output
5 100 200 300 130 160 290 110 155 265 56 72 128 240 180 420Note
In the sample we provide an example with five participants, with Vasya's results on the first line.