My code works and gives correct output on my computer but not here on Codeforces. Can anyone tell me why? 1283C - Friends and Gifts 67832300
My code works and gives correct output on my computer but not here on Codeforces. Can anyone tell me why? 1283C - Friends and Gifts 67832300
I think you should also initialize the boolian arrays "hasgot" and "hasgiven" to
falseor it may take garbage values. Correcting that works fine. 67841561Thanks!