diff --git a/7.[Fenwick Tree] Section Sum.cpp b/7.[Fenwick Tree] Section Sum.cpp index a19f6b9..8b453b8 100644 --- a/7.[Fenwick Tree] Section Sum.cpp +++ b/7.[Fenwick Tree] Section Sum.cpp @@ -11,7 +11,7 @@ using namespace std; int a[MAXN],c[MAXN],n; int lowbit(int p){ - return p&(p^(p-1)); + return p&(-p); } void modify(int p,int delta){