In last Div-2 contest, my this code 377729532 got accepted where this submission 377724457 recieved TLE verdict. Logic of both code are exactly the same. But, in the TLE version, I used bitset and used string instead in the AC submission. But, note that I initialized bitset array in global scope. So, in the TLE version, my code should do at max $$$3N + 2\sum n + T(7 \cdot \frac{N}{w} + 9 \cdot 31)$$$ operations. Here, $$$T \le 10^4, N = 10^5 + 1, w$$$ is word size i.e $$$64$$$. So, it shouldn't take more than $$$1.3$$$ s at all. But, then, why am I getting TLE? Can anyone explain, please?




