16204's blog

By 16204, 3 years ago, In English

(Feeling excessively confused, might delete later.)

So I admit I'm not exactly a computer specialist myself. But today after spending a large amount of time trying to optimize the solution for a problem, I came across this gem:

Okay, two submissions with one taking 2x time as the other. Must've been a terrible attempt at optimization which actually significantly increases the amount of operations, or somehow restructure the order of operations so the computer can't optimize them. Uh huh. Yeah sure. That would've been my thoughts, if this isn't what I added to the second submission:

Unless there is higher forces at play trying to botch my submission, I suspect that there must be some problem with the judge (or maybe I just don't understand how it works). While of course I'm not exactly sure what is happening, I think that adding a variable and increases it by one should not take up to 2000ms, and as such, this warrant some investigation.

(In case anybody wants to go and investigate this yourself, comment and I'll post the submissions and problem link on Ideone.)

Full text and comments »

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