#Lutece0795. Challenge Yourself
Challenge Yourself
Migrated from Lutece 795 Challenge Yourself
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Recently a famous game called 2048
is very popular among the world. In this problem we set a special version of 2048
, you can try the game by yourself, and discover the pattern of out version.
During the game, you can choose four direction to move, and combine lower numbers to larger numbers, you can find more detail during playing.
Your goal is to reach . Find a way to win the game, and output your solution.
Your output should be a string with only kinds of letters, u
, as you push UP
, d
, as you push DOWN
, l
, as you push LEFT
, and r
, as you push RIGHT
.
The length of your output string should be no more than .
The game website is down. But it implies that:
- At the beginning of the game, there's only a
2
at the bottom right of the board. - At each turn, add a
2
to the bottom place on the board where there's no number at it. If there are multiple places, choose the rightmost one.
Input
There are not input.
Output
On the first line out put a single number , it is the length of the operation string you will output.
The output a string in a line with only kinds of letters u
, l
, r
, d
.
The length should not exceed .
If any operation of your input is illegal, it will be ignored.
However, if you output any character except for u
, l
, r
, d
, you would get Wrong Answer.
Samples
(There are no sample input)
4
ulrd
Note
The sample output is NOT CORRECT, it just shows how to output your solution.
Resources
the 12th UESTC Programming Contest Preliminary