CommonLounge is a community of learners who learn together. Get started with the featured resources above, ask questions and discuss related stuff with everyone.
In which standard and board you are ? And how you have cleared ZCO without knowledge of algorithms ? Any book you have referred ? Apologies for all such nasty questions . However I am prepa...
When I looked at the test data from this page: All INOI contest problems, the test outputs seemed to be having a non-optimal path (probably using DFS) from the source to the destination.
The problem description states that if multiple routes are possible, print any one of them. But it seems the server doesn't find my solution to be correct.
Same issue here, even though I implemented DFS (Probably implemented a different order of checking directions than the server's solution)
Read more… (20 words)
Read (20 words)
NaN.
discussion
Leaf Eaters (ICO online judge)
For those of you who haven't solved this problem, this is one of the best problems from which you can learn how limitations of memory and time can make an easy problem, difficult to solve!
Just when I obtained the accepted sign after several trials, I was quite disappointed that I got a worst case running time of 1.98 s . So I headed over to Keshav's github repository and when I tried out the solution posted, it gave me a worst case running time of 0.024 s. Wow! Now that's a huge improvement. I really wanted to upgrade my arsenal with the procedure that had been used, but to my dismay I couldn't understand how it actually works. It would be great if someone posted the technique and procedure employed in solving the problem in the link attached above!
Note: The test-cases in the server has a bug (missing output file I think). One of the solvers figured out a workaround. If the answer is 34443, do not output anything.