You are viewing a single comment's thread. Return to all comments →
The decision in the editorial isn't quite right, is it?
mem[flag^1][j^v[i-1]]*((a[v[i-1]]+1)/2))
so it can be simplified as a*(b/2)
In integer arithmetic, this gives us an incorrect result. 10*(3/2)=10 but it should be 10*3/2=15
10*(3/2)=10
10*3/2=15
Seems like cookies are disabled on this browser, please enable them to open this website
Prime XOR
You are viewing a single comment's thread. Return to all comments →
The decision in the editorial isn't quite right, is it?
mem[flag^1][j^v[i-1]]*((a[v[i-1]]+1)/2))
so it can be simplified as a*(b/2)
In integer arithmetic, this gives us an incorrect result.
10*(3/2)=10
but it should be10*3/2=15