faster I/O

i mostly use c++ for my submissions. i knw that scanf/printf is faster than cin/cout.
i call syncwithstdio(false) to stop the sync and it optimises it little bit.

I want to know are there any other approaches to optimise it. (well, i’m sure there must be.)
cuz sometime stopping the sync isn’t enough and i get the TLE :confused:


add cin.tie(NULL); at the start of main(). Also use “\n” instead of endl.


thank you.i will do that.

1 Like