OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1c788a
)
Update docs/ds/fenwick.md
author
Lin Weijun
<37108698+Joke-Lin@users.noreply.github.com>
Wed, 13 May 2020 09:04:40 +0000
(17:04 +0800)
committer
GitHub
<noreply@github.com>
Wed, 13 May 2020 09:04:40 +0000
(17:04 +0800)
Co-authored-by: mgt <mgt@oi-wiki.org>
docs/ds/fenwick.md
patch
|
blob
|
history
diff --git
a/docs/ds/fenwick.md
b/docs/ds/fenwick.md
index
98ef081
..
e33f712
100644
(file)
--- a/
docs/ds/fenwick.md
+++ b/
docs/ds/fenwick.md
@@
-59,7
+59,7
@@
int lowbit(int x) {
**你可能又问了:x & -x 是什么意思啊?**
-> $-x$
代表 $x$ 的负数,计算机中负数使用对应的正数的补码来表示。
+> $-x$
是 $x$ 的相反数,计算机用补码来表示负数。$-x$ 的二进制表示等价于将 $x$ 的二进制表示取反再加一,即 `-x == ~x + 1`
例如 :
$x =88_{(10)}=01011000_{(2)}$ ;