I was solving this problem problem .I encountered a problem while inputting the string . In my first submission i used scanf("%s",arr) which resulted in WA. Then i changed the input method to cin >> arr , then the submission became AC. Submission using scanf -> scanf Submission using cin -> cin
Submission using scanf() worked fine in my pc, but not in codeforces.
Can someone help me why does scanf() doesn't work here? Thanks in advance :)



