소스 검색

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]));
 }