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

Автор haochenkang, история, 3 года назад, По-английски

Hello Codeforces community!

I have a question regarding question B in the recent CodeTon round.

My solution passed all pretests, but TLE on test 22 in the main tests. My code is: 150736681

I used an unordered_set to keep tracking of the seen elements. However, when I changed it to set, the solution passed main tests too. I have always thought that unordered_set is faster than set. Can someone please explain to me what's happening here?

Thanks for any help!

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

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