2009 Dennis MV Online Programming Contest - Judges' Notes
General Notes
- Judging Time Limit was 2 seconds. I have let most problems go up to 3 or
4 seconds, just in case.
- Judging problems was incredibly exciting! Checking Problem C in
particular was very cool, because it was the most complex problem to check
if contestant's and judge's outputs did not match. What if the judges were
wrong? [They were not :)]
- When I saw 4 of the problems were solved within first 30 minutes, it was
incredible!
- This was an Evil Problem Set. I've made problems harder for
this contest by
introducing formatting rules and larger input specifications.
Problem A - Watch Out!!
- I just had fun writing this problem. For example, what was the
name of the crazy scientist?
- Idea - reverse the clock! (so you can have more time solving the other
problems!)
Problem B - DJ Zhzyatslya
- DJ Zhzyatslya is a real DJ of Russian-Ukrainian origin. Can you
say his name
correctly?
- Idea - sum up two fractions and print them out! I took it straight
out of the grade book.
- Note -- input had spaced in it, to make it easy to read individual numbers without parsing the entire expression.
Problem C - Not a Composite Grid
- Original idea for this problem was by dimkadimon from TopCoder. It
was to have a 6 x 6 grid satisfying the prime adjacency rule. I also
knew problems like ECNA ICPC 2004 D that dealt with primes sums. So I
whipped up a monster of a program that was pure Evil! It has
formatting rules, impossible grids and varying grid sizes! Enjoy! :)
- The algorithm for this type of problem is Depth First Search or
Backtracking. Also, checking adjacency fast. And also,
optimizing the grids for sizes of 4x4 and under.
Problem D - Dogs with Large Eyes
-
Idea - find number that repeat in the array, and print them out. This
was similar to one of the interview questions I found online.
-
Hans Christian Andersen is a writer. He has a story called Tinder Box.
It will answer the question about whether I was sane when writing up this
problem :)
Problem E - Reversible Primes
- Idea - find reversible primes in a given interval.
- shoffman11 from TopCoder came up with the original write up for the
problem idea. It was about gambling on prime numbers with a guy named
Mo Ney.
- I've later introduced Sir Filthy Richard Moneybags The Third.
- Most of the anticipated difficulties were to do with reversing a number
fast
and with coding a fast prime checker.
- Trick - if you've pre-computed primes only up to 4,000,000, you've got a problem
after reversing this prime --> 1,000,039.