Odd performance disparity between printf(C) and cout(C++)

Правка en1, от oqfiqh, 2022-08-06 17:21:47

I solved problem B (permutation chain) of the last contest, and the same exact program using printf and scanf (stdio.h) went over the time limit by a fair chunk (exceeded the time limit by 2s for a single test),instead when using cout and cin (iostream) it passed all tests in 100ms.

Does anyone have any idea why this is happening?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский oqfiqh 2022-08-06 17:21:47 392 Initial revision (published)