#Lutece1313. Game
Game
Migrated from Lutece 1313 Game
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
Bob is playing a game with rounds.
He has points initially, and for every round, he will add points if he win, or subtract points if he lose.
If his score is less than zero after a round, the score will be changed to zero.
Bob is not honest always, so he may use a cheater to get an abnormal score.
Now you are given his final score , and you should determine whether Bob cheat in the game.
If it is impossible to get points, print CHEATED
.
Otherwise, print any possible sequence of game process.
Input
Five integers .
Output
If it is impossible to get points, print CHEATED
.
Otherwise, print a string with characters, consisting of O
and X
. If character is O
, Bob win in round; if character is X
, Bob lose in round.
There may be multiple solutions, you can print any one of them.
Samples
4 2 3 3 3
XOXO
2 1 100 2 2
CHEATED
Resources
The 14th UESTC Programming Contest Final