Блог пользователя -VIBE

Автор -VIBE, история, 12 месяцев назад, По-английски

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

  • Проголосовать: нравится
  • -3
  • Проголосовать: не нравится

»
12 месяцев назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

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.