TLE in ROWCOLOP and Discussion on fast input using getchar_unlocked()

this is my code. It is showing TLE.

When i used scanf in place of scan() here… i got AC.
But when i used getchar_unlocked it shows TLE.

I don’t know much about getchar_unlockded.
Plz help.

there is some error in your scan function…see this link!!!

if have put a scan fxn that i use…see this link!!!

corrected ur scan function…see this link…it is not giving TLE now…:slight_smile:

if u want to input a string using getchar_unlocked()…maybe this will help…:slight_smile:

@kunal361 But why it is not working with getchar_unlocked?

@kunal361 how to use getchar_unlocked[without scanf] in this code…

m not sure abt getchar_unlocked()…will get back to you if i figure out how it works…:slight_smile:

how to use getchar_unlocked here, in place of scanf:

you want to input a string using that??

have updated the ans…:slight_smile: