一些代碼實現上的東西

1.getline html

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

2.O(1)1~n異或和(證實)ide

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)快速乘spa

4.如何給一棵動態開點線段樹所有賦INF:只需把0的值設爲INF便可。code

相關文章
相關標籤/搜索