sguu's blog

By sguu, history, 7 years ago, In English

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

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

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

| Write comment?
»
7 years ago, hide # |
Rev. 3  
Vote: I like it +3 Vote: I do not like it

O(224) = TLE

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

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