伏滢
2025-6-1 18:33:42
bitset的用法以及优化方案
基本用法:https://oi-wiki.org/lang/csl/bitset/
bitset是以字节为单位存储的,所以单次操作的时间复杂度是O(n / m),m为机器的位数,n是bitset对象的长度。这样就可以优化O(n)时间复杂度,避免超时
例题:P10914 [蓝桥杯 2024 国 B] 跳石头 https://www.luogu.com.cn/problem/P10914
[code]#include #define PRINT_PI(presision, value) std::cout |
|