zr976 (+ dp set bit operation dp)
I think a lesson, feel that they could not before, a little autistic , in fact, want exactly the same approach with positive solutions . Last found that because the random data so that O (n * 2 ^ n) is a positive solution. I wrote about 1.5h, slow.
Which, as a tune 0.5h
2 because the following two cross-hair, (autistic ++)
Pan will become approximately 1. 0, the number of bits in a negative shift variable (1 << - 1 == 1 >> 1, but x = -1, 1 << x == 0)
2.long long remember to move around in a 1ll << x like this, not 1 << x