When I scan the input buffer (gesture string) character by character, I get WA here but not in my CodeBlocks IDE. - Link When using %s or storing the string in one go into an array, my code gets accepted here. - Link I have read a similar query here and I assume this is associated with the way stdin works over characters and string array along with input buffers. Can someone help me with a deep explanation of why this works on my IDE but not here? Any words over this would be highly appreciated. asked 11 Jul '17, 20:22 ![]()
|
this is the reason for your wrong answer: you are breaking the for loop without taking the whole input,then what happens is remaining input is taken as the input for the next testcase . try this testcase: 2 3 YNI 3 NIN answered 11 Jul '17, 20:48 ![]()
|