791 - Term Reductions

All about problems in Volume 7. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

791 - Term Reductions

Post by brianfry713 »

Use this thread to discuss this problem.
Check input and AC output for thousands of problems on uDebug!
tobby
Learning poster
Posts: 98
Joined: Fri Dec 30, 2005 3:31 pm

Re: 791 - Term Reductions

Post by tobby »

I must be misunderstanding the problem, since some of my output lines exceed 80 characters, but the question says
"It is guaranteed that ... the output lines will be shorter than 80 characters."
Can anybody post the correct output for the following input cases? Some explanation will also help.

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

Thanks!

[EDIT]Accepted by following UDebug closely.[/EDIT]
Post Reply

Return to “Volume 7 (700-799)”