programming contest: success
Date: Sun, 25 Sep 2005 16:52:33 -0700
From: Paul Hilfinger
To: tobin at csua dot berkeley dot edu
Subject: Congratulations!
Congratulations on your fine performance in Saturday's programming contest. Alas, you have both indicated to me that you do not meet the eligibility requirements for the ACM contests, so I can't put you on our teams this year, much as I'd like to. Still, I hope you enjoyed yourselves and have a pleasant semester.
Paul Hilfinger
no subject
The lisp expressions thing involved a little parser and then simple recursive tree printing.
The diagonal ladder thing just required a little math.
I first solved the diagonal one by implementing the function to get the linear coordinate recursively; that failed because a test case in the contest uses a high-numbered coordinate which caused stack overflow. A few minutes tinkering yielded the closed form expression for the coordinate.