I submitted 2 solutions to the July Cookoff 2020 problem Even-tual Reduction(https://www.codechef.com/problems/EVENTUAL) in the practice section.
Both the solutions are identical except that the number of testcases taken through the first one is by scanf and in the second one by cin. I got WA for first and AC for second and I couldn’t figure out why. Can anyone explain what’s the error with scanf ?
https://www.codechef.com/viewsolution/35816897 (with scanf)