-
Disclaimer: I have no stake in this event (I'm not participating). I strongly suspect there's a measurement error with the current top leader-board position:
Aside from the fact that it is an outlier (which could just be /awesome/ coding, local comparison of some of the other top contenders in C++ consistently shows it slower. Can you please check that the test configuration was the same? Perhaps unrelated, I suspect that that the anassajaanan has a bug in the number parsing code, leading to deviating totals for the "minimal cost city" in various test sets. Though it's possible that the actual test-set used on the server happens not to trigger the bug path, it's seems more likely something is going wrong with the measurements. I'd like to also point out that I think anassajaanan's submission is the only one to use |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 14 replies
-
Could webNeat's submission be affected by the same problem? This is more complicated since there's both a php and a c++ solution file. The C++ solution isn't particularly fast (although with elegant code, runs about 2x as long as sqrt-minus-one's solution). However, the PHP solution (not tested) forks (using If the PHP measurement is affected by a similar confusion due to it
Of course those are single runs on an old machine, but I'd really expect them to at least resemble the order on the leaderboard roughly? |
Beta Was this translation helpful? Give feedback.
-
Calling the expert here @chermehdi |
Beta Was this translation helpful? Give feedback.
-
Fair enough. I never realized that submissions could contain multiple solutions. That's why I phrased it as a question: I just uploaded the input.txt I used in my measurements above: https://stackoverflow-sehe.s3.amazonaws.com/blanat/input.txt.xz (4.4GiB download). Here's the output using another input.txt newly generated from gen.py: At least here the results are identical :) But the timings still completely contradict the leaderboard. In fact, I had a solution that just printed
Because statistically it's likely to occur (I haven't done the math, but a billion rows is a lot given 94x101 possible combinations: that's ~105329 lines for each prod x city. Each line a 1/9901 chance to have price = 1.00, meaning pretty close to 100% chance those happening for each prod x city combination?). It's possible people used this heuristic :) I'm willing to give |
Beta Was this translation helpful? Give feedback.
-
@sehe I did not understand how they calculate. They have a huge discrepancy in the results. I also tried it on my device and it gave me a discrepancy with the current results that they have in leaderboard |
Beta Was this translation helpful? Give feedback.
-
Even I didn't understand it, maybe there was something wrong while it was running at that time |
Beta Was this translation helpful? Give feedback.
That's one sad thing, we tested with a single output.txt if your solution is wrong but gets it right for that specific file it will be considered correct sadly (it will cost too much to change right now).
again, this might not be the best way to measure the time, but I don't think we will change it unless we have a better (fairer) way of doing this (When running, we keep getting consistent results from both solutions so I believe that's good enough for us).
What this actually means is that one solution is faster than the other on the particular server that we run on. (…