Browse Source

Add BitSet.del

Olivier Marty 8 years ago
parent
commit
978283f42c
1 changed files with 3 additions and 0 deletions
  1. 3 0
      code/BitSet.cpp

+ 3 - 0
code/BitSet.cpp

@@ -25,6 +25,9 @@ int size(T a[]) {
 void insert(T a[], int x) {
   a[x/BITS] |= ((T)1) << (x%BITS);
 }
+void del(T a[], int x) {
+  a[x/BITS] &= ~(((T)1) << (x%BITS));
+}
 void print(T a[]) {
   for(int i = 0; i < SIZE; i++)
     for(int j = 0; j < BITS; j++)