1.getline html
std::string str; getline(std::cin, str);
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; }
3.O(1)快速乘spa
4.如何給一棵動態開點線段樹所有賦INF:只需把0的值設爲INF便可。code