Noob-ita-coder's blog

By Noob-ita-coder, history, 7 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://codeforces.me/contest/1287/submission/68278756

https://codeforces.me/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

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

don't use set "gone"

»
7 years ago, hide # |
← 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.