contest_2011-09-06
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
contest_2011-09-06 [2011/09/05 11:58] – jtkorb | contest_2011-09-06 [2011/09/06 12:21] (current) – jtkorb | ||
---|---|---|---|
Line 17: | Line 17: | ||
===== Problems ===== | ===== Problems ===== | ||
- | * A: [[http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110202&format=html|Poker Hands]] (Repeated here for those of you who want to try it and for those who didn't quite get it last week.) | + | * A: [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8& |
* B: [[prelude to doublets|Prelude to Doublets]] | * B: [[prelude to doublets|Prelude to Doublets]] | ||
- | * B: [[http:// | + | * C: [[http:// |
- | * C: [[http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110402&format=html|Stacks of Flapjacks]] | + | * D: [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=32& |
- | * D: [[http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110508&format=html|Pairsumonious Numbers]] | + | * E: [[prelude to pairsumonious numbers|Prelude to Pairsumonious Numbers]] |
- | * E: [[http://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110601&format=html|How many Fibs?]] | + | * F: [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=33& |
- | Candidates... | + | * G: [[http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=34& |
- | + | ||
- | * Yahtzee | + | |
- | * Pairsumonious Numbers | + | |
- | * How Many Pieces of Land? | + | |
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 [[jtk@purdue.edu|me]] know. | 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 [[jtk@purdue.edu|me]] know. | ||
Line 34: | Line 30: | ||
* 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. | * 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. | ||
- | * B: The PC site does not judge this problem correctly, PC2 may not, either. | + | * B: The input format is the same as for Doublets. |
+ | * C: The PC site does not judge this problem correctly, PC2 may not, either. | ||
+ | * D: Be careful to allow for the case in which a single stack has flapjacks of the same diameter. | ||
+ | * E: For Pairsumonious Numbers, you'll need to store the N*(N-1)/2 values into a sorted array to use them to compute the N sums. This problem gets you set up for that. | ||
+ | * F: Although backtracking is discussed in a later chapter, it works here, too. | ||
+ | * G: Rumor has it that Sterling' |
contest_2011-09-06.1315249135.txt.gz · Last modified: 2011/09/05 11:58 by jtkorb