会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
shuguangzw
博客园
首页
新随笔
联系
订阅
管理
1
2
3
4
5
···
30
下一页
2018年2月25日
hihocoder1699
摘要: 链接:http://hihocoder.com/problemset/problem/1699 快毕业了的菜菜,做了个比赛,遇到四维偏序,调成了傻逼,所以记录下,看了下以前的傻逼代码,发现自己的cdq居然用sort 怪不得总是被卡常,然后就是套路cdq+cdq,这类题的坑点就是有相同的矩形 贴代码:
阅读全文
posted @ 2018-02-25 22:40 shuguangzw
阅读(289)
评论(0)
推荐(0)
2016年9月8日
玲珑学院OJ 1023 - Magic boy Bi Luo with his excited math problem 树状数组暴力
摘要: 分析:a^b+2(a&b)=a+b so->a^(-b)+2(a&(-b))=a-b 然后树状数组分类讨论即可 链接:http://www.ifrog.cc/acm/problem/1023 吐槽:这个题本来是mod(2^40),明显要用快速乘啊,但是用了以后狂T,不用反而过了,不懂出题人 #inc
阅读全文
posted @ 2016-09-08 13:48 shuguangzw
阅读(501)
评论(0)
推荐(0)
2016年9月6日
玲珑学院OJ 1028 - Bob and Alice are playing numbers 字典树,dp
摘要: http://www.ifrog.cc/acm/problem/1028 题解处:http://www.ifrog.cc/acm/solution/4 #include <cstdio> #include <cstring> #include <queue> #include <cmath> #in
阅读全文
posted @ 2016-09-06 18:38 shuguangzw
阅读(310)
评论(0)
推荐(0)
CSU 1807: 最长上升子序列~ 分类讨论
摘要: 1807: 最长上升子序列~ Description Bobo 在 ICPCCamp 学会了解决最长上升子序列问题后得到了一个长度为 n 的数列 p1,p2,…,pn. Bobo 想用 1,2,…,n 来替换其中值为 0 的元素,使得 p1,p2,…,pn 互不相同(即 p1,p2,…,pn 是 {
阅读全文
posted @ 2016-09-06 11:30 shuguangzw
阅读(408)
评论(0)
推荐(0)
2016年9月5日
CSU 1806 Toll 自适应simpson积分+最短路
摘要: 分析:根据这个题学了一发自适应simpson积分(原来积分还可以这么求),然后就是套模板了 学习自适应simpson积分:http://blog.csdn.net/greatwall1995/article/details/8639135 #include <cstdio> #include <cs
阅读全文
posted @ 2016-09-05 14:56 shuguangzw
阅读(267)
评论(0)
推荐(0)
2016年8月31日
bzoj1070 [SCOI2007]修车 费用流
摘要: 分析:巧妙构图,记得某一次bc的最后一道题就是这个,就是借鉴这个老题吧,貌似很多题都是借鉴这个题 关键在于,倒着看是某个人倒数第几个修,这样只影响后面的人,跑费用流就好了 #include <iostream> #include <stdio.h> #include <string.h> #incl
阅读全文
posted @ 2016-08-31 18:39 shuguangzw
阅读(191)
评论(0)
推荐(0)
2016年8月30日
Codeforces Round #369 (Div. 2) 套题
摘要: A:模拟水题不说 #include <iostream> #include <string.h> #include <algorithm> #include <stdio.h> #include <math.h> #include <bitset> using namespace std; type
阅读全文
posted @ 2016-08-30 15:38 shuguangzw
阅读(221)
评论(0)
推荐(0)
2016年8月15日
POJ1751 Tree 树分治
摘要: 分析:每次找重心可以发现最多n层,每层复杂度是O(nlogn) 总体时间复杂度是O(nlog^2n) #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #in
阅读全文
posted @ 2016-08-15 22:16 shuguangzw
阅读(194)
评论(0)
推荐(0)
HDU2196 Computer 树形dp
摘要: 分析:两遍dfs的树形dp裸题,记录子树最长链,然后自顶向下更新即可。。。 #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> #include <vector> #include <queue>
阅读全文
posted @ 2016-08-15 15:48 shuguangzw
阅读(291)
评论(0)
推荐(0)
HDU5834Magic boy Bi Luo with his excited tree 树形dp
摘要: 分析:典型的两遍dfs树形dp,先统计到子树的,再统计从祖先来的,dp[i][0]代表从从子树回来的最大值,dp[i][1]代表不回来,id[i]记录从i开始到哪不回来 吐槽:赛场上想到了状态,但是不会更新,而且据说这是一种典型的树形dp,还是太弱 #include <cstdio> #includ
阅读全文
posted @ 2016-08-15 14:45 shuguangzw
阅读(346)
评论(0)
推荐(0)
1
2
3
4
5
···
30
下一页
公告