I'm getting an NZEC for this particular problemspoj.com/problems/ABCPATH/
My code works correctly for the test case stated in the problem though.Here is my work:ideone.com/fXLM6u
Since i can't figure out what might have caused an NZEC,it would be extremely helpful if anyone could figure it out and let me know the reason behind it.Thank You.
That whole ugly mess of if statements can be replaced with two for loops and a single if statement.
On top of that, I'm not certain that you understand the problem. If you do understand the problem you have made some incorrect assumptions.