yashgulani's blog

By yashgulani, history, 7 years ago, In English

IN problem c of testing round 14 held on 22-12-2017 , By using long long the solution is getting tle but by doing type casting the solution gets accepted. http://codeforces.net/contest/910/submission/33517729 ------>>> accepted http://codeforces.net/contest/910/submission/33517599 ------>>> tle Thanks if anyone could help

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by yashgulani (previous revision, new revision, compare).

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

CHanging 1LL << 60 to (ll)1<<60 solution is getting accepted yyy??

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

Looks like the run time for both attempts is very close to the limit. So, one solution got lucky, and the other one got unlucky. To make it pass regardless of luck, speed it up more significantly (10-20% or more).