bjorn-martinsson
bjorn-martinsson
> @lrvideckis I tested this version o Zfunc and the current one, and in the [problem](https://codeforces.com/gym/105053/problem/H) in witch I tested it it was faster with the current one than with...
I kind of agree that this is a bug. If the graph is a tree than the code is correct, but on general graphs it is wrong. The fact that...
Ah yes, you are correct. Hmm I wonder what would be the best fix. Btw, one modification that might be worth doing is to change ```py for child in graph[start]:...
There is a simpler algorithm for xor basis. ```py basis = [] def reduce(x): for b in basis: x = min(x, x ^ b) return x def insert(x): x =...
1. I agree with Cheran that bit_length should not be a parameter. If you want a fancy print it would be better to use `max(self.basis).bit_length()`. But you probably should just...
The issue is that if len (the variable self._len) is a power of 2, then query(len, len) or query(len, len, value) will fail. This is arguably not a bug, but...
Think the main thing is that we need to make sure that the implementation is correct. It also would be good to check that it runs fast enough to be...