Aaron N. Tubbs bio photo

Aaron N. Tubbs

Dragon chaser.

Twitter Facebook Google+ LinkedIn Github

About 2AM, time to go to bed, but first an update on my programming puzzles.

Here’s how 10137 went:

  1. Wrong Answer
  2. Forgot dollar signs. Oops. Wrong answer.
  3. Floating point precision issue. Wrong answer.
  4. Changed rounding strategy. Solved.

My solution is available, once again. This problem pissed me off, because a lot of stuff depended on the interpretation to correctness and rounding. Not really a problem worth doing, I don’t think.

706 fared a little better in terms of time spent tracking down the issue, but the mistakes were embarassing:

  1. Wrong answer.
  2. Switched from mod/div reduction to string character splitting to get around zero prefixes. Wrong answer.
  3. Dumb spacing mistake. Learn to read the spec. Wrong answer.
  4. Different dumb spacing mistake. Learn to read the spec. Wrong answer.
  5. Oh. Right. Debug code been there all along. Stupid stupid stupid. Wrapped in ONLINE_JUDGE macro. Solved.