shuneo's blog

By shuneo, history, 13 months ago, In English

Im learning BIT (Fenwick tree), i saw a expression that is x & -x to find largest power of two don't larger than x.

But i can't clear this expression, please tell me the truth. Thank you very much!

I searched google and don't have any more knowledge that it is a trick.

I asked GPT but it have just give example but don't proof. I've just known that this expression is a trick :'( and no more.

And more, could you give me some bitwise-research-documents? I hope that learn more about bitwise, thank you.

Full text and comments »

  • Vote: I like it
  • +8
  • Vote: I do not like it

By shuneo, history, 14 months ago, In English
char c = '"';
// it is compiled and successed.

I have a question that: why we can char c = '"'; instead of using char c = '\"'.

I used to think that char c = '"' is wrong before.

Thank you alot

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By shuneo, history, 19 months ago, In English

I have problems that I can't solve sum of the first N prime numbers ( N <= 2,500,000). Honest, I don't have any solution for that. Help me! thank you!

Full text and comments »

  • Vote: I like it
  • +1
  • Vote: I do not like it