https://ide.codingblocks.com/s/55905
The sample test case is giving correct output.
But on submitting it shows no-output and wrong answer
Funky Chessboard
Hi Akshay, please check your input output statements correctly.
Hi Akshay, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.
I couldn’t understand that. Could you please elaborate ? How are the input / output statements causing a wrong answer in the actual test cases but not in the sample test case ?
Hi Akshay, the logic that you have applied here is wrong. Due to improper logic the calculations are getting overlapped and your ans variable total is getting irrelevant values. Please try again with a correct approach.
Hint: DFS fashion recursion but do not implement it using gaphs.
Hope this helps
I have written another code now https://ide.codingblocks.com/s/74070 but it is giving wrong answer as well. Please help