791 - Term Reductions
Moderator: Board moderators
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
791 - Term Reductions
Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
Re: 791 - Term Reductions
I must be misunderstanding the problem, since some of my output lines exceed 80 characters, but the question says
Thanks!
[EDIT]Accepted by following UDebug closely.[/EDIT]
Can anybody post the correct output for the following input cases? Some explanation will also help."It is guaranteed that ... the output lines will be shorter than 80 characters."
Code: Select all
X
(((((XX)X)X)X)X)
((((XX)(XX))X)X)
(((XX)X)X)
((XX)(XX))
((XX)(((XX)X)X))
((XX)((XX)(XX)))
(((XX)X)(((XX)X)X))
(((XX)(((XX)X)(((XX)X)X)))X)
((XX)((((XX)X)(((XX)X)X))X))
((XX)(((X((XX)(XX)))(X((XX)(XX))))X))
((XX)((((XX)(XX))X)((X((XX)(XX)))X)))
0
[EDIT]Accepted by following UDebug closely.[/EDIT]