[personal profile] nibot
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

Date: 2005-09-28 12:10 am (UTC)
From: [identity profile] nibot.livejournal.com
The permutation puzzle was solved with a backtracking search.
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.

March 2020

S M T W T F S
1234567
891011121314
15 161718192021
22232425262728
293031    

Style Credit

Page generated Oct. 28th, 2025 08:26 am
Powered by Dreamwidth Studios

Expand Cut Tags

No cut tags

Most Popular Tags