It's also a common mistake to make the priority queue keep the furthest node at the top, not the closest node. Although it looks ridiculous, random tests aren't very good to hack these either. You can see how my
First to go over the solution quickly (skip down a few paragraphs if you already know the solution): one can use binary search to reduce the range of possible locations for the train to a constant multiple ofK, such as6K. Just make sure to expand out both ends of the range byKafter e...
Well, from my point of view getting hacked is worse than failing systests, since in the last case you get to adore your results for some time rather than being crushed immediatly from realization that your solution is incorrect. So the dude above could just hack a few and leave the rest...
The time limit is the most amount of time your solution will run on a single test. In case your solution takes more time to complete, you will receive a “Time Limit Exceeded” (TLE) verdict. If your solution gets time limit exceeded for a certain test, it will be run several times ...
Zhtluo → [Tutorial] Splay Tree: One Tree to Rule Them All xiaofu15191 → I am curious about a CE problem on the compiler Clang Vectors_Master → Codeforces Round 1007 (Div. 2) Editorial sevlll777 → Codeforces Round 1004 (Div. 1, Div. 2) Editorial my_psy_code → Python and...
Today I completed my second competition (#333) and an important question regarding time limits arose. I solved theB problemin O(n) time and after locking the problem, I saw that a participant in my room solved it in O(n^2) time. Consequently, I wanted to hack his solution based on...
Having spent a number of Codeforces rounds practicing the ins and outs ofRust, I think it's finally safe to encourage wider participation in the language! This guide is intended primarily for C++ programmers who may have taken interest in Rust, but had doubts regarding its feasibility in timed...
while everyone should know that FOR(z,n) should be the outer loop, not the inner one. I tried to hack this solution, so I inputted graph 0-3-2-1, however my test was rejected, because problem was about trees and there was a constraint that parent of vertexishould be less thaniand...
Today I completed my second competition (#333) and an important question regarding time limits arose. I solved theB problemin O(n) time and after locking the problem, I saw that a participant in my room solved it in O(n^2) time. Consequently, I wanted to hack his solution based on...
"are there many solutions for sample tests or it's one solution only?" byBakry,_QWOiNYUIVMPFSBKLiGSMAP_,bhowmik,mahdi.hasnat Answer: Another good question, we made global clarification about this later. This was obvious from the samples, I think, but it was a mistake not to write it...