407797: GYM102894 E The Curious Case Of Vasya

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. The Curious Case Of Vasyatime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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).

Input

The 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).

Output

If 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

PointsLimitsDependenciesGrading policy
110$$$a = b = c$$$-each test
260$$$1 \le a, b, c \le 100$$$-each test
330$$$1 \le a, b, c \le 50000$$$-each test

ExampleInput
4 1 2
Output
5
100 200 300
130 160 290
110 155 265
56 72 128
240 180 420
Note

In the sample we provide an example with five participants, with Vasya's results on the first line.

加入题单

算法标签: