sguu's blog

By sguu, history, 4 weeks ago, In English,

Someone Plzz Tell me reason of TLE of above submission??

https://codeforces.com/contest/1017/submission/48585414

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

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
4 weeks ago, # |
Rev. 3   Vote: I like it +3 Vote: I do not like it

O(224) = TLE

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    it's around 2*10^7 operation.how could it give TLE?

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

it is O(2^24 * 12), but you can precalc fn(mask) for all masks

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

You should add the following 2 lines:

ios_base::sync_with_stdio(0);
cin.tie(0);

48588707