Harvey Mudd College
Computer Science Department

Programming Practicum Page     HMC ACM 2004       STL       STL(SGI)       Java 1.5  API


Congratulations! to the HMC teams in the 2003 Southern California regionals. The standings out of 62 competing teams:


Problems

 
  TEAM        
MBGDHJC
       
BRGMSS
       
BBYKJH
       
CPMMCE
       
MBMWAD
       
ECJDAR
       
PSBHES
       
RHRA
       
Person9
       
Person10
       
Person11
       
Person12
       
Person13
       
Person14
       
Person15
       
Person16
       
Person17
       
Person18
       
Person19
       
Person20
       
Person21
       
Person22
       
Person23
       
Person24
       
Person25
       
Person26
       
Person27
       
Person28
       
Person29
       
Person30
 
   October 26 2004                   
 
Tourist Guide (tourist.java)         
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
Done (EC)
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    tourist.in     tourist.out                                    
 
Adventures in Moving (moving.java)         
Done.
       
NY
       
Done.
       
late Dec.
       
NY
       
12/7 4:40
       
12/6 11:19
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    moving.in     moving.out                                    
 
Nice Milk (milk.java)         
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    milk.in     milk.out                                    
 
Expressions (exp.java)         
Done.
       
Done.
       
NY
       
12/7 20:30
       
late Dec.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    exp.in     exp.out                                    
 
Football aka Soccer (soccer.java)         
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
11/30 18:40
       
late Dec.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    soccer.in     soccer.out                                    
 
Poker Hands (poker.java)         
Done.
       
Done.
       
Done.
       
Done.
       
NY
       
10/31
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    poker.in     poker.out                                    
 
  TEAM        
BBYKJH
       
ECJDAR
       
MBMWAD
       
PSESCE
       
RHBHCP
       
MBGMMDH
       
Person7
       
Person8
       
Person9
       
Person10
       
Person11
       
Person12
       
Person13
       
Person14
       
Person15
       
Person16
       
Person17
       
Person18
       
Person19
       
Person20
       
Person21
       
Person22
       
Person23
       
Person24
       
Person25
       
Person26
       
Person27
       
Person28
       
Person29
       
Person30
 
   October 5 2004                   
 
Fire Station (fire.java)         
10/5
       
Done.
       
NY
       
late Dec.
       
12/17 1:33
       
12/2 16:10
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    fire.in     fire.out                                    
 
Yahtzee (yahtzee.java)         
NY
       
Done.
       
Done.
       
Done.
       
NY
       
10/5 17:10
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    yahtzee.in     yahtzee.out                                    
 
Merging Maps (maps.java)         
NY
       
NY
       
late Dec.
       
NY
       
late Dec.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    maps.in     maps.out                                    
 
Weights & Measures (turtles.java)         
Done.
       
10/19 15:14
       
11/24 17:49
       
11/4 4:42
       
late Dec.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    turtles.in     turtles.out                                    
 
Tower of Cubes (cubes.java)         
10/10 23:14
       
10/10 19:58
       
10/20 10:43
       
10/5 17:53
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    cubes.in     cubes.out                                    
 
Color Hash (puzzle.java)         
Done.
       
Done.
       
late Dec.
       
NY
       
NY
       
11/18 21:47
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    puzzle.in     puzzle.out                                    
 
  TEAM        
RHMMAR
       
YKMBJH
       
ESJDPS
       
MBGCEDH
       
ADBHECCP
       
RABBMW
       
Person7
       
Person8
       
Person9
       
Person10
       
Person11
       
Person12
       
Person13
       
Person14
       
Person15
       
Person16
       
Person17
       
Person18
       
Person19
       
Person20
       
Person21
       
Person22
       
Person23
       
Person24
       
Person25
       
Person26
       
Person27
       
Person28
       
Person29
       
Person30
 
   September 21 2004                   
 
Stack 'em up (stack.java)         
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    stack.in     stack.out                                    
 
Bicoloring (twocolor.java)         
11/29 17:16
       
Done.
       
Done.
       
10/3 15:34
       
12/9 00:56
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    twocolor.in     twocolor.out                                    
 
Hanoi Troubles (hanoi.java)         
Done.
       
Done.
       
Done.
       
9/30 23:13
       
Done.
       
10/2 18:52
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    hanoi.in     hanoi.out                                    
 
Cutting Sticks (sticks.java)         
10/2 23:23
       
11/11 20:21
       
Done.
       
11/30 00:21
       
10/21 01:23
       
10/2 11:51
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    sticks.in     sticks.out                                    
 
Unidirectional TSP (tsp.java)         
Done.
       
11/11 23:53
       
12/8 7:00
       
Done.
       
Done.
       
10/2 10:11
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    tsp.in     tsp.out                                    
 
File Fragmentation (frag.java)         
NY
       
9/29 23:33
       
Done.
       
NY
       
10/1 02:44
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    frag.in     frag.out                                    
 
  TEAM        
ARBB
       
MWRH
       
DHMM
       
MBBH
       
ADRA
       
JDES
       
ECMBG
       
CEJH
       
PSCPYK
       
Person10
       
Person11
       
Person12
       
Person13
       
Person14
       
Person15
       
Person16
       
Person17
       
Person18
       
Person19
       
Person20
       
Person21
       
Person22
       
Person23
       
Person24
       
Person25
       
Person26
       
Person27
       
Person28
       
Person29
       
Person30
 
   August 31 2004                   
 
Check the Check (check.java)         
Done.
       
11/24 00:34
       
Done.
       
10/4 16:44
       
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    check.in     check.out                                    
 
Intersecting Dates (dates.java)         
Done.
       
NY
       
NY
       
NY
       
NY
       
Done.
       
NY
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    dates.in     dates.out                                    
 
Multiplication Game (mult.java)         
Done.
       
11/24 00:50
       
Done.
       
10/4 17:41
       
Done.
       
11/11 13:09
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    mult.in     mult.out                                    
 
How Many Fibs? (fibs.java)         
Done.
       
12/1 21:54
       
Done.
       
10/5 02:06
       
Done.
       
Done.
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    fibs.in     fibs.out                                    
 
Garden of Eden (eden.java)         
Done.
       
Done.
       
Done.
       
NY
       
Done.
       
12/3 4:0512/3 4:05
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    eden.in     eden.out                                    
 
Distinct Subsequences (subseq.java)         
Done.
       
Done.
       
Done.
       
12/5 00:06
       
Done.
       
12/2 19:00
       
Done.
       
Done.
       
Done.
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
       
NY
    subseq.in     subseq.out                                    

Grading

This class is graded by default. However, you may certainly take the course Pass/Fail, if you would like.
Here is the table mapping problems solved to grades.

Languages

The ACM contest has stated that it will support three languages: C, C++, and java. At the moment, the automatic grading script only supports grading with java and g++, i.e., files ending in .java or .cc, respectively. I'm looking forward to the day they add python to the list of supported languages.

Submission

Be sure to name your file the same as the name of the problem, and then type
/cs/ACM/acmSubmit <filename>.cc
You should run acmSubmit from the directory in which your submission file is located (due to my limited understanding of Perl).

The script will test your file against a number of inputs. Unlike the ACM contest, if your submission's output differs from the "correct" output, the differences will be shown to you. This is a protection against the "correct" output not actually being correct. If your program passes all of the tests the script will let you know. It will also email me in order to help me keep the chart of solved problems updated.

Compiling your code:

While testing your code, you can compile with the commands

javac filename.java
or
g++ filename.cc
to create an executable file named a.out.

To check your program, download the input and output files (right-click on the links and choose "save link as...") or create your own test inputs, and then run
java  < <testfilename>
or
a.out < <testfilename>
That will print the results to the console (stdout) for inspection. You might also pipe the results to a file and check them against the anticipated output with diff.

Related Links

HMC ACM competition home page This contains links to several large problem sites.
Spring 2004 Programming Practicum Home Page
Fall 2003 Programming Practicum Home Page
Spring 2003 Programming Practicum Home Page
Fall 2002 Programming Practicum Home Page
Spring 2002 Programming Practicum Home Page
Fall 2001 Programming Practicum Home Page
Spring 2001 Programming Practicum Home Page
Fall 2000 Programming Practicum Home Page
Spring 2000 Programming Practicum Home Page