mukel's blog

By mukel, 10 years ago, In English

Today I starred a dramatic/pure-adrenaline experience.

It was during TopCoder SRM 646, after a few months of no participation on SRMs, I started fresh, by configuring Greed (arena plugin) from zero on my shiny Mint box. It was 3:00AM 3, 2, 1 ... Go, SRM 646 started.

250 was rather easy I think, I managed to solve it in a few minutes. The 600 problem was another story, the idea was rather standard, compress the coordinates ... and BFS, but the implementation was, without doubt, the most difficult part. I coded and coded, and coded using the old C++ standard with make_pair, long-named iterators and no auto ... I'm quite rusty since I'm using mainly Scala now, and suddenly C++ seemed to be very verbose.

I finished coding 2 minutes before the end, but with only the first test case PASSED, I had no idea, my code was hairy, I double checked, triple checked, but nothing. The adrenaline kept me focused, and in the last 5 seconds I decided to submit with only one test PASSED, yes I know I'm crazy, but I was very confident..., no wait, I wasn't, but something (my internal purely-rational programmer) pushed my to submit my "wrong" solution in the last second, yes, in the last second!!!!. The "Contest ended" message box followed my submission instantly. I felt sad because in such cases the most probable outcome is obvious, but I still had some hope.

The challenge phase started, one by one, many solutions (of red coders) were mercilessly hacked, but not mine, I was intrigued, nearly the end of the challenge phase I suddenly remembered that the Greed tester code runs all the tests in a single run, it does not run your program for each test (I knew it, but I'm rusty). F#!U%*C@#*&%K!!!!!!, all the static variables were filled with garbage after the first test.

I regained confidence, I still had no guarantee at all, I was again in tension. System testing started, and YEEEEEEEEEESSSSSSSSSSSSSS, System Tests Passed on both problems, the adrenaline rush make me feel that I was the smartest human being ever lived. I finished 34th overall, and everything due to my self-confidence. I feel like a boss!!!

I hope that you enjoyed such a large post, it's a lesson about luck (yes, mainly luck), confidence and the risks and rewards that came attached.

  • Vote: I like it
  • +102
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

and new MAX Rate :P

»
10 years ago, # |
  Vote: I like it +8 Vote: I do not like it

I coded and coded, and coded using the old C++ standard with make_pair, long-named iterators and no auto ...

And C++ in Topcoder is actually C++11 :D

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It seems they are using C++11 since 2013. Good to know.

»
10 years ago, # |
  Vote: I like it +11 Vote: I do not like it

And this is why you should always configure plugins to run fresh executions of your program for every test (I'm pretty sure greed can do that).

Getting the code right on the first try with 2 minutes remaining, now that's awesome.