This is the Problem Link:-
This is My solution:-
https://www.codechef.com/viewsolution/28048571
My Solution Pass All Test Cases Visible and i want to Know What is Wrong with it.
This is the Problem Link:-
This is My solution:-
https://www.codechef.com/viewsolution/28048571
My Solution Pass All Test Cases Visible and i want to Know What is Wrong with it.
You’re not initialising the contents of arr
, so they will be essentially unpredictable.
Yeah thanks submitted AC but in my machine which uses gcc it always initialised with 0 so, i didn’t thought to initialise.
That’s why uninitialised stuff is so dangerous