Problem C
Darts Scoring
Languages
en
is

Hannes went to a work gathering with his coworkers and like many times before the choice of venue was a darts bar, as is very common with Icelandic software development companies. As the game progressed it became clear to Hannes that one of the other players was very likely to finish the game on his next round. Thus he figures he has to finish the game right now on his round to win. But how can he go about this?
In each round a player can throw up to three darts. For hitting directly in the centre you get $50$ points, this is called a Bullseye. For hitting the ring around the centre you get $25$ points, this is called a Outer bullseye. Then there are $20$ slices of the circle outside this centre. Hitting a given slice gives $1$ to $20$ points depending on the slice, so hitting slice $17$ would for example give $17$ points and be called Single 17. On each slice is a narrow strip that gives double points, so hitting that strip on slice $8$ would give $16$ points and be called Double 8. Finally there is another narrow strip on each slice that gives triple points, so hitting that strip on slice $11$ would give $33$ points and be called a Triple 11.
Can you tell Hannes all the ways he could finish the game in at most three throws?
Note that you do not have to end with a specific kind of throw like Double unlike in some versions of darts.
Input
The input contains a single positive integer $x$, the number of points Hannes needs to score to finish the game. It will always hold that $x \leq 501$.
Output
You should start by printing a single line with an integer $n$ that gives the number of ways that Hannes can finish the game on his round in one to three throws. For each such way you should print the following. First print an integer $k$ on its own line, the number of throws to be made. Then there should follow $k$ lines, the $i$-th of which gives where the $i$-th dart should land, using the names given above.
Notice that Bullseye, Single 1 and Single 1, Bullseye count as different ways to get $51$ points, the order does not matter.
However, the order in which the ways to get $x$ points are printed does not matter. Any ordering is considered correct.
Scoring
Group |
Points |
Constraints |
1 |
20 |
$x = 1$. |
2 |
30 |
$x \leq 5$. |
3 |
40 |
$x \leq 100$. |
4 |
10 |
No further constraints. |
Sample Input 1 | Sample Output 1 |
---|---|
2 |
3 1 Single 2 1 Double 1 2 Single 1 Single 1 |
Sample Input 2 | Sample Output 2 |
---|---|
3 |
7 1 Single 3 1 Triple 1 2 Single 1 Single 2 2 Single 1 Double 1 2 Single 2 Single 1 2 Double 1 Single 1 3 Single 1 Single 1 Single 1 |
Sample Input 3 | Sample Output 3 |
---|---|
200 |
0 |