tito_916May '21My code is fine.Butt it is giving wrong ans.I used cin.eof() for break the loopcreatedMay '21last replyMay '213replies691views2users1like
tito_916May '21Because it works for any testcases.problem is in using cin.eof().If you have any doubt feel free to check the comments on problem page.
simesMay '21Any? I think the WA means there is at least one test case where your code doesn’t work. Your challenge is to find that test case. 1163 people have got AC, so I suspect the test cases are probably correct.