Hacker News new | ask | show | jobs
by victor82 1080 days ago
The solution exposed don't seems competitive enough to solve with good rank the problem exposed here https://highload.fun/tasks/14

That site is really good to play with SIMD code.

3 comments

The solution codes are not available as you can continuously update your solution.
What is actually the task here? Parsing is clear and it looks like one has to sum all parsed timestamps, but what does the additional comment about the shortest time mean?
It means that your solution is scored on how fast it runs.

Frequently we end up with solutions that use tricks that would not be applicable to the n=1 problem in TFA ("parse 1 timestamp") when we try to get the fastest solutions for "find the sum of all these timestamps."

How can I see Yuriy’s top solution for this task?
You can ask him but he probably won't share
Kind of a weird leaderboard if you can’t even check to see if answers satisfy correctness. I’ve seen plenty of leaderboards where the top answers would fail cases that weren’t covered by the leaderboards testing.
I think it's not such a big deal because the input generators are usually pretty good and because most solutions that give up some correctness for performance can pretty cheaply detect that they done goofed and fall back to a slow path where they start over and do it some other way. This ends up being useful because scoring is the median runtime of 3 successful runs (so if you fail one of the 3 then your submission fails completely). It also means that probabilistic solutions that would be correct in non-adversarial environments (like using a bloom filter or N bloom filters tuned to give an exact result given the input constraints with probability >99.9%) are admissible.
This particular solution does satisfy correctness, although I can't share the source code (as the competition is ongoing). Feel free to provide your input data and I'll run it to compare with your expected result.
Yeah, most of the leetcode top solutions are a hardcoded table of answers for the scoring questions followed by the general solution.
Is the code for some of the solutions available? Thanks for the link. That's a fun place.