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:

2 Likes

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

4 Likes

thank you.i will do that.

1 Like