Bit Array in C++

前端 未结 8 1067
旧时难觅i
旧时难觅i 2021-02-05 06:09

When working with Project Euler problems I often need large (> 10**7) bit array\'s.

My normal approach is one of:

bool* sieve = new bool[N];

bool sieve[         


        
8条回答
  •  野趣味
    野趣味 (楼主)
    2021-02-05 06:53

    You might be interested in trying the BITSCAN library as an alternative. Recently an extension has been proposed for sparseness, which I am not sure is your case, but might be.

提交回复
热议问题