一些代码实现上的东西

1.getline 

std::string str;
getline(std::cin, str);
getline

2.O(1)1~n异或和(证明)

inline void Xor(int x) {
    int t = x & 3;
    if(t & 1) return (t >> 1) ^ 1;
    else return (t >> 1) ^ x;
}
O(1)异或和

3.O(1)快速乘

猜你喜欢

转载自www.cnblogs.com/huyufeifei/p/10554025.html