随笔分类 -  各种模板

[模板][快速排序&归并排序]
摘要:不得不说,手写的快排真的好菜。(即使开了随机数...) 快速排序 #include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> using namespace std; inline int read(); const 阅读全文

posted @ 2019-09-07 15:11 iNx 阅读(218) 评论(0) 推荐(0)

[模板][HDU]P2544[单源最短路][SPFA]
摘要:题目就不放了,主要是写一下SPFA,很少写,今天特别学了一个用STL的队列来做的。 代码: 阅读全文

posted @ 2017-11-08 19:10 iNx 阅读(197) 评论(0) 推荐(0)

[模板][splay]
摘要:splay ——!x^n+y^n=z^n update:[更新size] get:[判断是否为右孩子] clear:[清除一个节点] rotate:[旋转] splay:[转到根] insert:[插入一个点] find:[查找元素v在序列中的排名] findx:[查找排名为x的点] pre:[前驱 阅读全文

posted @ 2017-10-28 08:41 iNx 阅读(177) 评论(0) 推荐(0)