Преглед на файлове

Correct size of bit sets

Olivier Marty преди 8 години
родител
ревизия
38fc6d1d18
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      code/BitSet.cpp

+ 1 - 1
code/BitSet.cpp

@@ -2,7 +2,7 @@
 typedef long long T;
 const int MAXN = 5000;
 const int BITS = (sizeof(T)*8);
-const int SIZE = ((MAXN+BITS)/BITS); // size of arrays
+const int SIZE = ((MAXN+BITS-1)/BITS); // size of arrays
 void clear(T a[]) {
   memset(a, 0, sizeof(T[SIZE]));
 }