随笔分类 -  技巧

主要是语言使用技巧以及其它与算法关联较小但很有帮助的内容.
摘要:三个镜像,备用. 阅读全文
posted @ 2021-02-28 15:06 goverclock 阅读(21662) 评论(0) 推荐(6)
摘要:负数取模,整除. 阅读全文
posted @ 2021-02-23 15:40 goverclock 阅读(985) 评论(0) 推荐(0)
摘要:DFS有多耗费空间? 阅读全文
posted @ 2021-02-18 11:42 goverclock 阅读(90) 评论(0) 推荐(0)
摘要:vector的insert,erase. 阅读全文
posted @ 2021-01-30 18:48 goverclock 阅读(53) 评论(0) 推荐(0)
摘要:无返回值: 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(); 阅读全文
posted @ 2021-01-06 11:07 goverclock 阅读(302) 评论(0) 推荐(0)
摘要:deque (转载自https://www.cnblogs.com/aiguona/p/7281739.html) 阅读全文
posted @ 2020-12-25 19:56 goverclock 阅读(248) 评论(0) 推荐(0)
摘要:结论:N/M 向上取整: (N - 1) / M + 1. 阅读全文
posted @ 2020-12-25 16:53 goverclock 阅读(1533) 评论(0) 推荐(0)
摘要:1.创建堆 a.创建以内置类型(int,float等)为元素的堆. #include <queue> priority_queue<int> big; // 大顶堆 priority_queue<int, vector<int>, greater<int> > small; // 小顶堆 之后就可以 阅读全文
posted @ 2020-12-19 10:36 goverclock 阅读(1947) 评论(0) 推荐(0)