Блог пользователя akulsareen

Автор akulsareen, 12 лет назад, По-английски

I had to resubmit an old solution of mine on Codeforces. So I took my old solution, which had a lot of individual #includes in it, replaced them all with one common #include <bits/stdc++.h> and resubmitted.

Surprisingly, my old solution, which gave an AC, gave TLE on case 6 after the change.

Links:

Old solution

New solution

Could someone please point out what happened here?

  • Проголосовать: нравится
  • +13
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thats really weird... Here both codes ended up in TLE

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

I've resubmitted your first submission and got TL too (10349435).

It's kinda weird, because it took 0.3s to run on test #6 in 2014, which is more than three times smaller than TL.

Probably it happened because of GCC update, same code gets OK with Visual Studio (10349485) right now.