CP_Sucks's blog

By CP_Sucks, history, 5 years ago, In English

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

  • Vote: I like it
  • -1
  • Vote: I do not like it

»
5 years ago, # |
  Vote: I like it +1 Vote: I do not like it

don't use set "gone"

»
5 years ago, # |
Rev. 3   Vote: I like it +1 Vote: I do not like it

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.