864 - Scheme Pretty-Printing

All about problems in Volume 8. 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
..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

864 - Scheme Pretty-Printing

Post by .. » Sun Oct 24, 2004 10:53 am

Well......the definition in this problem is so troublesome, my PE code is so messy.......
Could anyone give me some in/out for possible PE? Thanks!
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    We can learn much more in discussion than reading source code.
  • I HATE testing account.
  • Don't send me source code for debug.

..
A great helper
Posts: 454
Joined: Thu Oct 18, 2001 2:00 am
Location: Hong Kong

Post by .. » Sun Dec 24, 2006 5:32 pm

Could any one give the output of this input? Thanks in advance :)

Code: Select all

(+ (- b c (d)) (- a b (c)))
My signature:
  • Please make discussion about the algorithm BRFORE posting source code.
    We can learn much more in discussion than reading source code.
  • I HATE testing account.
  • Don't send me source code for debug.

mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf » Sun Dec 24, 2006 6:54 pm

My accepted solution's output:

Code: Select all

(+ (- b
      c
      (d))
   (- a
      b
      (c)))

Post Reply

Return to “Volume 8 (800-899)”