CS98-1/CS198-1 Assignment #1

Fall, 2003

Due: Thurs., 4 Sep. 2003 at midnight.

Read the attached three contest problems carefully. After doing so, make an estimate for each of how long it would take you to write a working program to solve them. The constraints on your solution are that you want to write a program quickly that is good enough to produce results for the expected sorts of input in, say, 15-30 seconds.

Select at least two of the problems and develop solutions (in either Java or C/C++), keeping track (be honest!) of how long it takes you. Compare these times with your estimates. What took more (or less) time than you expected, and why?

Important: Programs take input from the standard input, not a named file, regardless of what the instructions say

Hand in your solutions electronically. Here's how.

Problems

  1. 1998 ACM Pacific NW Regional Contest, Problem B (Immediate Decodability).
  2. 1998 Berkeley Programming Contest, Problem 3 (Checkers).
  3. 1997 Berkeley Programming Contest, Problem 6 (Shopping network).

[Course Home Page]

Page was last modified on Fri Sep 5 11:12:33 2003.
Address comments and questions to hilfinger@cs.berkeley.edu