putchar_unlocked vs putchar

For high speed output I am using function which uses putchar_unlocked. I get ‘Wrong Answer’ if I use putchar_unlocked, but if I replace it with putchar, I get TLE (that means answer is correct). Is it possible that putchar_unlocked will lead to wrong answer?

Getting a TLE doesnot mean your answer is correct. It simply means your program took more time to generate the entire output. The checking is done after that.

1 Like
//