Блог пользователя Noob-ita-coder

Автор Noob-ita-coder, история, 6 лет назад, По-английски

I tried to implement recent div2B with as optimised constant as i could. Can someone tell why my solutions TLE. It Tled 7 times in contest. I tried many approaches

eg submissions

https://mirror.codeforces.com/contest/1287/submission/68278756

https://mirror.codeforces.com/contest/1287/submission/68277154

Can someone tell why the first submission TLE on TC 10

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

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

don't use set "gone"

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

getting same, but then made some changes

string str = str + "abs" is slower than str+="abs"

endl is slower than "\n"

used u-map instead of map

but i don't like the it, it should not be tle. author must check.