FreePascal input/output is too slow on CF

Revision en10, by IloveGoodness, 2021-10-08 21:21:23

Printing ":-)" $$$10^6$$$ times takes about 2.6s in CF (131141089) while it takes just 0.7s in my machine (with 2.4 GHz cpu). I found this issue after tying to solve a problem which required $$$10^6$$$ output lines. My initial blog:

Please take a look at: 4021643 and 6576225. They are exactly same but one runs in 2s the other in 0.1s. Accepted solution was sent 10 month later. Again I submitted same solution after 8 years and got TLE 130976507 while in my computer, runs in just 0.188s

There is a bug in CF compiler for sure, Please solve this issue Mikemizayanov.

Thanks :)

UPDATE: I submitted printing $$$10^6$$$ times program on AtCoder (Link). Here is the result:

Codeforces: 2.6s VS Atcoder: 0.066s

Tags pascal, fpc, free pascal, bug

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en10 English IloveGoodness 2021-10-08 21:21:23 209
en9 English IloveGoodness 2021-10-08 13:43:05 2 Tiny change: 'Update: **Printing "' -> 'Update: ** Printing "'
en8 English IloveGoodness 2021-10-08 13:42:09 12 Tiny change: 'Printing "' -> '**Update: **Printing "'
en7 English IloveGoodness 2021-10-08 13:40:08 3
en6 English IloveGoodness 2021-10-08 13:39:28 501 Tiny change: 'tput lines:\n_Please ' -> 'tput lines.\n\n_Please '
en5 English IloveGoodness 2021-10-06 15:44:29 114
en4 English IloveGoodness 2021-10-05 02:53:03 79
en3 English IloveGoodness 2021-10-04 16:26:21 65
en2 English IloveGoodness 2021-10-04 16:24:07 32
en1 English IloveGoodness 2021-10-04 16:09:29 467 Initial revision (published)