http://www.cnblogs.com/live-no-regrets/
摘要: 平衡树是很常用的,但splay的代码实在忘得太多,考场上时间紧没有时间推,所以平时记住比较好。 只上精简版的。 #include<cstdio> #include<string.h> #include<algorithm> #include<cmath> #define N 110000 using 阅读全文
posted @ 2018-01-12 18:03 voyage~st~Imagine 阅读(201) 评论(0) 推荐(0) 编辑
摘要: GDKOI考前复习一下快速排序。对于普通数字元素的快排,详细见网址。 但对于字符串的排序一直都比较玄学,因为用普通的手打比较函数总会WA,有时必须用C的char *配上strcmp函数作比较才稳。此外,对于字符串的排序的qsort详见网址(内含qsort的n种其他用法,包括结构体排序等,qsort的 阅读全文
posted @ 2018-01-12 17:41 voyage~st~Imagine 阅读(1707) 评论(0) 推荐(0) 编辑