Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

Scanf slower than cin ?

Revision en1, by lbm364dl, 2021-06-23 21:13:47

I'll leave it short. I got time limit because of big input so I started submitting some IO variations. I also decided to compare with using scanf, which should be faster, but for some reason using cin with ios_base::sync_with_stdio(false) shows about 400ms (120387767) while using scanf shows about 750ms (120392401). Am I doing something wrong? Why is scanf variant slower here?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English lbm364dl 2021-06-23 21:13:47 522 Initial revision (published)