随笔分类 - 技巧
主要是语言使用技巧以及其它与算法关联较小但很有帮助的内容.
摘要:无返回值: inline void read(int& x) { x = 0; char c = getchar(); while (!isdigit(c)) c = getchar(); while (isdigit(c)) x = x * 10 + c - '0', c = getchar();
阅读全文
摘要:deque (转载自https://www.cnblogs.com/aiguona/p/7281739.html)
阅读全文
摘要:结论:N/M 向上取整: (N - 1) / M + 1.
阅读全文
摘要:1.创建堆 a.创建以内置类型(int,float等)为元素的堆. #include <queue> priority_queue<int> big; // 大顶堆 priority_queue<int, vector<int>, greater<int> > small; // 小顶堆 之后就可以
阅读全文

浙公网安备 33010602011771号