Scanf slower than cin ?

Правка en1, от 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?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский lbm364dl 2021-06-23 21:13:47 522 Initial revision (published)