It gives no ouput when submitting on 2nd sample test case whereas gives correct output when ran on Leetcode .
My idea is to make the first row and first column same as they are in chess boards , If its possible return the answer else it is Impossible @akshitm16@ssjgz@ssrivastava990@cubefreak777@tamo11@lotthbrok
My question is not about Where my code fails , it is about why my code is failing to give any output on submission for the same test case that it is passing while I am running it on the same platform
I donāt know how leetcode works under the hood, but doesnāt it give the input as the argument to the function that you have to fill out (e.g. movesToChessboard(vector<vector<int>>& board)) so you donāt have to/ mustnāt read from stdin?
Thanks Making a guess as to how Leetcode works - the OP is reading in/ stealing data from cin that was intended for the Leetcode testcase reader/ checker, causing it to go haywire.