User Tools

Site Tools


contest_2011-09-06

This is an old revision of the document!


Weekly Contest for September 6, 2011

One-Time Setup

From your lab workstation, use these commands to get started…

 % mkdir pc2
 % cp -p /homes/cs390cp/pc2/pc2v9.ini pc2

Join the Contest

 % cd pc2
 % /homes/cs390cp/pc2/bin/pc2team &

Log in using your individually assigned “teamX” account and password. You can work in the current window/directory, creating a subdirectory for each problem.

Problems

If you've already solved one or more of these problems, try (1) solving again without referring to your old solution, and/or (2) using a different language (Java or C++). If you want to work on an additional problem from this chapter, let me know.

Hints:

  • A: The main trick to this problem is creating a hand evaluation method that returns a simple value that can be compared to other hands. One representation of hand value is as a six-character string, where the first character represents the hand type (e.g., 1 = “high hand”, 9 = “straight flush”) and the remaining five characters are encoded values of the cards (e.g., “A” = deuce, “B” = three, …, and “M” = ace) in order of relevance to the hand type (e.g., list the three-of-a-kind from a full house before the pair, even if the pair is higher).
  • C: The PC site does not judge this problem correctly, PC2 may not, either. Get an “Accepted” at the UVA site before submitting to contest.
contest_2011-09-06.1315267091.txt.gz · Last modified: 2011/09/05 16:58 by jtkorb