04 2017 档案

省赛感想
摘要:感觉自己在摸鱼 其实感觉是能拿银的 陈明建卡题了 导致后面的数位做不出来 注意力越来越不能集中了 很难受 其实不是很想做了 但是我觉得自己还是喜欢的 我想去拿块金牌 看到他们拿牌的时候还是很难受 虽然长大了很多 以前也是这样难受 贼弱 陈明建他们能带我就很棒了 我还想再打一年 阅读全文

posted @ 2017-04-25 20:30 HelloWorld!--By-MJY 阅读(131) 评论(0) 推荐(0)

树DP
摘要:都类似 深搜处理出来一些信息 然后最后用一下 #include<stdio.h> #include<algorithm> #include<stdlib.h> #include<cstring> #include<iostream> #include<string> #include<cmath> 阅读全文

posted @ 2017-04-18 09:17 HelloWorld!--By-MJY 阅读(124) 评论(0) 推荐(0)

poj 3481 平衡树
摘要:裸的treap #include<stdio.h> #include<algorithm> #include<stdlib.h> #include<cstring> #include<iostream> #include<string> #include<cmath> #include<vector 阅读全文

posted @ 2017-04-16 19:48 HelloWorld!--By-MJY 阅读(189) 评论(0) 推荐(0)

平衡树treap的基本操作
摘要:也是一棵平衡树所以要旋转 (pri,key); 左边小右边大 key pri 符合堆 实现log 的操作 #include<stdio.h> #include<algorithm> #include<stdlib.h> #include<cstring> #include<iostream> #in 阅读全文

posted @ 2017-04-15 15:30 HelloWorld!--By-MJY 阅读(135) 评论(0) 推荐(0)

日期时间的一些模板
摘要:#include<stdio.h> #include<algorithm> #include<cstring> #include<string> #include<cmath> #include<vector> #include<queue> using namespace std; #define 阅读全文

posted @ 2017-04-13 21:19 HelloWorld!--By-MJY 阅读(170) 评论(0) 推荐(0)

字典树
摘要:HDU 1251 就裸的字典树了 #include<stdio.h> #include<algorithm> #include<cstring> #include<string> #include<cmath> #include<vector> #include<queue> using names 阅读全文

posted @ 2017-04-11 21:08 HelloWorld!--By-MJY 阅读(143) 评论(0) 推荐(0)

poj 3017
摘要:n 个数字 m 把n个数字分成一些段 然后每一段的和不能超过m 求分成这些段 每段的最大值 之和 最小 一开始 前缀和 二分 线段树 n *n *log(n) 不出意外吃个TLE 至少有一点长进了 然后看了一下是单调队列 1 显然 每个数都大于m 就不行了 单调队列 维护的是 合法区间里最大的那个数 阅读全文

posted @ 2017-04-09 16:25 HelloWorld!--By-MJY 阅读(257) 评论(0) 推荐(0)

codeforces 716
摘要:A n个数 m 递增的 如果2个数的差大于m 那么前面的字就会消失 问最后有几个字 从后往前走一下 #include<stdio.h> #include<algorithm> #include<stdlib.h> #include<cstring> #include<iostream> #inclu 阅读全文

posted @ 2017-04-08 21:25 HelloWorld!--By-MJY 阅读(149) 评论(0) 推荐(0)

poj 1742 背包
摘要:n 个物品 背包体积m n 个物品的价值 n 个物品的数目 参考http://www.cnblogs.com/xinsheng/archive/2013/12/04/3458362.html 分3种情况 1 个数只有1个 显然是0 1 n*c 2 价值*数目>m 完全背包 n*c 3 用队列优化 这 阅读全文

posted @ 2017-04-07 19:16 HelloWorld!--By-MJY 阅读(131) 评论(0) 推荐(0)

单调队列 POJ 2823
摘要:维护一个队头和队尾 单调队列的性质 单调 时间 n 这边讲维护小的 因为维护单调 从队尾进去 经过 w 1 3 -1 -3 3 3 6 7 ind 1 2 3 4 5 6 7 8 k=3 初始话一下 头 w 1 尾 ind 1 w 1 3 因为3比1 大 放在后面 ind 1 2 w 1 3 然后要 阅读全文

posted @ 2017-04-07 15:15 HelloWorld!--By-MJY 阅读(152) 评论(0) 推荐(0)

大组合数取mod lucas 定理
摘要:计算 C(n,m)%p; 这边p是质数 如果不是质数就要麻烦一点 具体的证明不会 只能用那个公式 阅读全文

posted @ 2017-04-04 21:17 HelloWorld!--By-MJY 阅读(209) 评论(0) 推荐(0)

导航