-VIBE's blog

By -VIBE, history, 18 months ago, In English

my solution 210657479 passes by using a bitset but will give a tle if i use vector...cant figure out the time complexity of reset function

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

»
18 months ago, # |
  Vote: I like it +3 Vote: I do not like it

For a bitset of $$$n$$$ bits, it cost $$$O(n/w)$$$ time to apply reset().

For instance, when $$$w=64$$$, the bitset compress every 64 0/1 elements as a unsigned long long, so you can simply think it's 64 times faster.