Kuangbin
叶子心情你不懂
帅哥
展开
-
Kuangbin专题三Dancing Links
Kuangbin专题三Dancing Links跳舞链这东西以前在hihocoder上翻到过,当时看的模模糊糊的,现在好好学一学。 暂时写到了精确覆盖和重复覆盖两种,板子稍微有点区别。A - Exact cover HUST - 1017板子题,和hihocoder上那道题差不多,多了个答案栈。hust没法交,也不知道写的对不对。#include <queue&gt原创 2018-07-18 21:53:34 · 348 阅读 · 0 评论 -
Kuangbin专题十六KMP & 扩展KMP & Manacher(A~L)
A - Number Sequence HDU - 1711Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a ...原创 2018-09-29 21:29:55 · 551 阅读 · 1 评论 -
Hdu 1890 Kuangbin代码
翻别人的题解都是把要翻的最小点splay到根然后旋转左子树然后删去根节点,Kuangbin模板里的代码不知道在干嘛。研究了半天,旋转是一样的,但是不删除。比如旋转[l, r]区间,就让l-1变根,r+1变根的右儿子,那么[l, r]都在r+1的左子树上了,然后一个个交换左右儿子来翻转。node[i]表示第i个元素,要得到l-1要调用get_kth(l),同理要得到r+1要调用get...原创 2018-10-07 22:07:18 · 230 阅读 · 0 评论 -
Kuangbin专题十匹配问题
套班子灾区、、、板子在手天下我有、、、A - Fire Net HDU - 1045Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a p...原创 2018-10-07 12:08:46 · 3200 阅读 · 0 评论 -
Kuangbin专题十六KMP & 扩展KMP & Manacher(M~Z)
M - Substrings HDU - 1238You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any...原创 2018-10-01 12:00:57 · 721 阅读 · 0 评论 -
Kuangbin专题七线段树
没写完,还有五题,好像是乱七八糟建模乱七八糟维护什么的,在家里真的没心思写题目,先发博客吧以后再补换个代码量少的专题写写。 A - 敌兵布阵 HDU - 1166C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的...原创 2018-09-04 19:23:53 · 496 阅读 · 0 评论 -
Kuangbin专题八生成树
这个专题真是做的人欲生欲死,模型太多了,我就当板子用吧。。。A - The Unique MST POJ - 1679Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a connected, u...原创 2018-08-17 16:13:33 · 438 阅读 · 0 评论 -
Kuangbin专题五并查集
并查集也是很难的啊。。。A - Wireless Network POJ - 2236An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexp...原创 2018-08-13 17:26:32 · 468 阅读 · 0 评论 -
Kuangbin专题四最短路练习
刷了两天半终于百度完了所有题。什么时候能自己写出题目。Orz,太菜了。 A - Til the Cows Come Home POJ - 2387 Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes...原创 2018-08-09 20:02:31 · 570 阅读 · 0 评论 -
Kuangbin专题一简单搜索
kuangbin专题一简单搜索棋盘问题 POJ - 1321深搜题,注意的是剪枝——剩下的格子不够了就return。 单开两个一位数组记录挺方便,没有习惯性map。#include &lt;cstdio&gt;#include &lt;iostream&gt;#include &lt;utility&gt;#include &lt;vector&gt;原创 2018-07-07 18:40:44 · 228 阅读 · 0 评论 -
Kuangbin专题二搜索进阶
kuangbin专题二搜索进阶A - Eight HDU - 1043用康托展开来状态压缩,方便记录路径。另外路径反着记。最后他娘的竟然打表,无耻。 八种方法#include &amp;lt;string&amp;gt;#include &amp;lt;queue&amp;gt;#include &amp;lt;cstdio&amp;gt;#include &amp;原创 2018-07-14 01:38:11 · 680 阅读 · 2 评论 -
Kuangbin专题十四数论基础
A - Bi-shoe and Phi-shoeLightOJ - 1370Bamboo Pole-vault is a massively popular sport in Xzhiland. And Master Phi-shoe is a very popular coach for his success. He needs some bamboos for his studen...原创 2019-04-02 10:36:04 · 1790 阅读 · 0 评论