// 如果x为1,则将设置n位;如果x为0,则将清零。 number ^= (-x ^ number) & (1LL << n);
set(n,val)-将bitn设置为值val。
std::bitset<5> num(std::string("00100")); num.set(0,true); // num现在是00101 num.set(2,false); // num现在是00001
友情链接: json在线解析 通晓查询 糯晒黄历 姓名打分