上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 附上一个讲极角排序还不错的博客 https://www.cnblogs.com/aiguona/p/7248311.html struct Point { double x, y; Point () {} Point (double _x, double _y) : x(_x), y(_y) {} 阅读全文
posted @ 2018-08-02 16:03 过路人1998 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 附上电科算法讲堂 https://www.bilibili.com/video/av23189029?t=641 (感谢那些讲课的美好的人们) 阅读全文
posted @ 2018-07-31 09:18 过路人1998 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 没错 抄的板子 理不壮,气也直! 所以.....我把这个优秀的博主链接贴上 hhhhhhhhhhhh (博客也很漂亮) https://www.cnblogs.com/victorique/p/8480093.html 阅读全文
posted @ 2018-07-30 10:37 过路人1998 阅读(87) 评论(0) 推荐(0) 编辑
摘要: class AC { public: int next[maxn][26], lst[maxn], fail[maxn], val[maxn]; int sz, root; void init() { root = sz = 0; for (int i=0; i q; int i, rt, id; fail[... 阅读全文
posted @ 2018-07-26 08:34 过路人1998 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 附上别人讲解的博客 https://www.cnblogs.com/YSFAC/p/7189571.html https://blog.csdn.net/jerry_wang119/article/details/79312519 阅读全文
posted @ 2018-07-25 09:21 过路人1998 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 成链的时候 是最坏情况 O(n^2)的复杂度呢! 按照输入的数据 一个一个的插入建树 然后维护左右儿子的个数 (我们规定, 左儿子 小于 父亲 右儿子大于父亲) 往左走 说明存在逆序对 逆序对的个数就是父亲+父亲右儿子的节点数 阅读全文
posted @ 2018-07-22 11:32 过路人1998 阅读(275) 评论(0) 推荐(0) 编辑
摘要: // 根据下标 得到相应块...我感觉..这个就是核心了= =. // vlen = sqrt(1.0 * n); inline int getid(int index) { return (index - 1) / vlen + 1; } void add() { // Todo : 添加一个元素 同时维护块信息 } void sub(int index) { ... 阅读全文
posted @ 2018-07-22 10:25 过路人1998 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; typedef long long ll; int intval; // 排序函数什么的 还有排序函数需要用到的变量都放到全局中 否则会出错. ///// 因为排序函数要求 static 表示静态 所以排序函数用到... 阅读全文
posted @ 2018-07-22 10:15 过路人1998 阅读(139) 评论(0) 推荐(0) 编辑
摘要: class TreeArraryTwo{public :const static int cmaxn = 1e3+200;int date[cmaxn][cmaxn];int xsz, ysz;void init(int size_x, int size_y) {xsz = size_x; ysz 阅读全文
posted @ 2018-07-22 08:48 过路人1998 阅读(93) 评论(0) 推荐(0) 编辑
摘要: typedef long long ll; const int maxn = 1e5+500; ll qans; // 记录答案 int date[maxn]; // 数据数组 int tarray[maxn]; // 归并排序的中间数组 // POJ - 2299 SGU - 180 void merge(int arr[], int left... 阅读全文
posted @ 2018-07-21 19:10 过路人1998 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页