|
Seems to me guess-and-check really only gets bad as N approaches M. But you can solve that easily: If N > M / 2, then do guess-and-check for (M-N) and then invert the bits. Now your worst case scenario is N = M / 2, which really isn't all that bad. You're doing on average just under two checks for the last bit you set, and less for the bits before that.
|
# ¿ Jun 28, 2014 16:19 |
|
|
# ¿ May 10, 2024 15:28 |
|
Enjoyed the ending. Wrapped up the story nicely.
|
# ¿ Jul 23, 2014 03:40 |
|
Oh wow I'd read that one before but completely forgot about it.
|
# ¿ Jul 23, 2014 04:03 |
|
sighnoceros posted:I've finished SPACE DEFENSE! Pretty good, but could you maybe lengthen the pause after you lose? I barely have enough time to see my score, sometimes I miss it.
|
# ¿ Aug 7, 2014 21:50 |