摘要:
1.邦邦的大合唱站队 https://www.luogu.org/problem/show?pid=3694 XY说这是道简单的签到题,然后我大概是普及组都拿不到三等的那种了。。 插入题解。写得太好了,不刊之论,orzSXY大佬 http://www.cnblogs.com/Serene-shixi 阅读全文
posted @ 2017-09-04 21:15
啊宸
阅读(161)
评论(0)
推荐(0)
摘要:
1.洛谷 点分治1 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #includ 阅读全文
posted @ 2017-09-04 19:34
啊宸
阅读(126)
评论(0)
推荐(0)
摘要:
1.单源最短路 //Twenty #include<cstdio> #include<iostream> #include<cstdlib> #include<algorithm> #include<cmath> #include<cstring> using namespace std; int 阅读全文
posted @ 2017-09-04 19:32
啊宸
阅读(182)
评论(0)
推荐(0)
摘要:
1.BZOJ 2434 阿狸的打字机 AC自动机+树状数组 //Twenty #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #include<queue> using 阅读全文
posted @ 2017-09-04 19:18
啊宸
阅读(205)
评论(0)
推荐(0)
摘要:
写太丑了被卡常了,先码。 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #inc 阅读全文
posted @ 2017-09-04 19:13
啊宸
阅读(231)
评论(0)
推荐(0)
摘要:
传送门 线段树 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include< 阅读全文
posted @ 2017-09-04 19:11
啊宸
阅读(188)
评论(0)
推荐(0)
摘要:
树状数组简单题。一维排个序,另一维加树状数组里就可以搞了。 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #in 阅读全文
posted @ 2017-09-04 19:10
啊宸
阅读(116)
评论(0)
推荐(0)
摘要:
某天全是数据结构的考试题T3 在我学LCT之前就在轩神的博客中看到过这个归类在LCT里,所以事先知道了算法,不过这个貌似也挺明显的。(虽然分块更好写) 考场上为了证明哇我会写LCT诶就强行打了只打过一遍的LCT,然后Debug两个小时。。。最后还一不小心交了一个没debug的版本。。 //Twent 阅读全文
posted @ 2017-09-04 19:03
啊宸
阅读(162)
评论(0)
推荐(0)
摘要:
一开始潜意识就认为是splay模板,打了140+行,还调了很久(自己码力太弱了) 然后听学长说不用打标记,可以存全局的增减值,于是写了一个60-的权值线段树,非常快且好看地就A掉了 //Twenty #include<cstdio> #include<cstdlib> #include<iostre 阅读全文
posted @ 2017-09-04 18:57
啊宸
阅读(131)
评论(0)
推荐(0)
摘要:
//Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:51
啊宸
阅读(134)
评论(0)
推荐(0)
摘要:
//Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:50
啊宸
阅读(131)
评论(0)
推荐(0)
摘要:
//Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #include<vector> 阅读全文
posted @ 2017-09-04 18:32
啊宸
阅读(127)
评论(0)
推荐(0)
摘要:
传送门 每次只要修改链头实际代表的颜色即可 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<qu 阅读全文
posted @ 2017-09-04 18:31
啊宸
阅读(152)
评论(0)
推荐(0)
摘要:
1.KMP #include<cstdio> #include<cstdlib> #include<algorithm> #include<cmath> #include<cstring> #include<iostream> using namespace std; int next[100]; 阅读全文
posted @ 2017-09-04 18:22
啊宸
阅读(204)
评论(0)
推荐(0)
摘要:
1.线段树 //Twenty #include<cstdio> #include<cstdlib> #include<cstring> #define lc x<<1 #define rc x<<1|1 #define mid ((l+r)>>1) using namespace std; cons 阅读全文
posted @ 2017-09-04 18:15
啊宸
阅读(422)
评论(0)
推荐(1)
摘要:
BZOJ 3239 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<queue> #includ 阅读全文
posted @ 2017-09-04 17:27
啊宸
阅读(208)
评论(0)
推荐(0)
摘要:
板 //Twenty #include<cstdio> #include<iostream> using namespace std; int n,a[10000500],t[10000500],ans; void ms(int a[],int t[],int l,int r) { if(l==r) 阅读全文
posted @ 2017-09-04 17:23
啊宸
阅读(141)
评论(0)
推荐(0)
摘要:
放几个高一上写的模板,高精除法什么的好像并没有什么用,写过板后就没用过了。 //Twenty #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<cstdlib> #include<algori 阅读全文
posted @ 2017-09-04 17:19
啊宸
阅读(182)
评论(0)
推荐(0)
摘要:
其实并不怎么会用,有一次有位学长提到了这个名字,就这么取题目了。 1.BZOJ 3687 简单题 求子集的算术和的异或和 http://www.lydsy.com/JudgeOnline/problem.php?id=3687 我们并不需要知道每个数(和)出现了多少次,只需知道它出现了奇数次还是偶数 阅读全文
posted @ 2017-09-04 17:15
啊宸
阅读(1355)
评论(0)
推荐(0)
摘要:
送分题 1.没有上司的舞会 很久之前写的了,然后看了一下当时的代码感觉有点迷? 似乎是把可以一起选的装成一个背包,然后硬生生用背包做,状态加一维表示这个级别的选没选,没选才可以选它的儿子级别的。 其实没怎么看,就口胡一下。 //Twenty #include<cstdio> #include<ios 阅读全文
posted @ 2017-09-04 16:35
啊宸
阅读(182)
评论(0)
推荐(0)
摘要:
1.传纸条 好像是一道普及组水题? //Twenty #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> using namespace std; int n,m,a[55][55],f[55][55][ 阅读全文
posted @ 2017-09-04 16:24
啊宸
阅读(166)
评论(0)
推荐(0)
摘要:
简单题 1.学校食堂 https://vijos.org/p/1546 看起来很简单,结果写了好久好久。我太弱啦。 dp[i][j][k]表示i以前的都处理好了,j表示 i及i以后的七个人的01处理状态,k表示这个状态是由哪个人转移过来的(1~mm表示i之前的,mm+1以后表示i和i之后的人) 一开 阅读全文
posted @ 2017-09-04 16:13
啊宸
阅读(566)
评论(9)
推荐(0)
摘要:
简单的斜率优化模板题 1.BZOJ 1010 玩具装箱 f[i]=f[j]+(i-j-1+sum[i]-sum[j]-L)^2; 设a[i]=sum[i]+i, C=-1-L; f[i]=f[j]+(a[i]-a[j]+C)^2; 考虑当j优于k时,有 f[j]+(a[i]-a[j]+C)^2<f[ 阅读全文
posted @ 2017-09-04 15:29
啊宸
阅读(188)
评论(0)
推荐(0)
摘要:
这几天就水水博客把以前学过的东西整理一下,其实感觉还是比较有必要的,很多东西学了之后很快就忘了QAQ不知是不是我太蠢 https://vjudge.net/problem/POJ-2976 题意:给定A数组B数组,从中选择N-K个使得R最大,输出Round(100*R); 01分数规划问题就是给定两 阅读全文
posted @ 2017-09-04 15:10
啊宸
阅读(150)
评论(0)
推荐(0)
摘要:
1.二分 NOIP2016 跳石头 //Twenty #include<cstdio> #include<cstdlib> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> using namespace 阅读全文
posted @ 2017-09-04 14:47
啊宸
阅读(150)
评论(0)
推荐(0)
摘要:
给定n和k,每次k平方后取前n位,求出现的最大值。 所谓Floyd判圈法,一个人跑一步一个人跑两步的神奇算法。 https://vjudge.net/problem/UVA-11549 //Twenty #include<cstdio> #include<cstdlib> #include<iost 阅读全文
posted @ 2017-09-04 14:40
啊宸
阅读(206)
评论(0)
推荐(0)

浙公网安备 33010602011771号