Sweety

Practice makes perfect

导航

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 62 下一页

2016年5月13日

摘要: Picture Time Limit: 2000MS Memory Limit: 10000K Total Submissions: 11720 Accepted: 6181 Description A number of rectangular post... 阅读全文

posted @ 2016-05-13 10:39 蓝空 阅读(170) 评论(0) 推荐(0) 编辑

2016年5月12日

摘要: Vases and Flowers Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 38 Accepted Submissio... 阅读全文

posted @ 2016-05-12 22:10 蓝空 阅读(136) 评论(0) 推荐(0) 编辑

摘要: http://poj.org/problem?id=3694 这题是给了一个连通图。 问再加入边的过程中,桥的个数。 先对原图进行双连通分支缩点。可以形成一颗树。 这颗树的边都是桥。 然后加入边以后,查询LCA,LCA上的桥都减掉。 标记边为桥不方便,直接标记桥的终点就可以了。 ... 阅读全文

posted @ 2016-05-12 21:02 蓝空 阅读(201) 评论(0) 推荐(0) 编辑

2016年5月11日

摘要: Weighted Median 简单排序求和 不过这里有个处理0.5这样的数小技巧,先乘2,之后按照整数操作就行了。 #include #include #include #include #include #include #include #include ... 阅读全文

posted @ 2016-05-11 22:42 蓝空 阅读(172) 评论(0) 推荐(0) 编辑

摘要: Hearthstone II n场比赛,m个场地,m #include #include using namespace std; const int MOD=1e9+7; int main(){ int n,m; long long dp[10... 阅读全文

posted @ 2016-05-11 22:41 蓝空 阅读(128) 评论(0) 推荐(0) 编辑

摘要: Full Binary Tree 在满二叉树中求两个节点的最近距离 #include #include #include #include #include #include #include #include #include #include #include #i... 阅读全文

posted @ 2016-05-11 22:36 蓝空 阅读(117) 评论(0) 推荐(0) 编辑

摘要: Factorial 水题,求阶乘 #include #include #include #include #include #include #include #include #include #include #include #include #include ... 阅读全文

posted @ 2016-05-11 22:35 蓝空 阅读(116) 评论(0) 推荐(0) 编辑

摘要: Devour Magic n个单位,每个单位每秒增加1法力,在某些时间取走一些区间的法力值(取走之后该区间所有单位的法力变为0),求取得的所有法力值。 就是在原来的基础上增加了清零的操作,不过这个清零(实际代码中也可以置为任意值)的操作通过flag标志和一个sset变量来保存下要置的数,... 阅读全文

posted @ 2016-05-11 22:34 蓝空 阅读(171) 评论(0) 推荐(0) 编辑

摘要: Colorful Cupcakes 给出ABC三种颜色的个数,求相邻颜色不相同,首尾颜色不相同的串的个数。 思路: 开始的时候感觉就是个搜索,但是一想简单搜索肯定超时,dp的话也没找出递推公式,竟让把记忆化搜索给忘了,悲哀。。。 dp[i][a][b][k]表示前i个位置A有a个B有b... 阅读全文

posted @ 2016-05-11 22:32 蓝空 阅读(129) 评论(0) 推荐(0) 编辑

摘要: Circle n个数围成一个圈,编号0~n-1,从一个数到其上一个和下一个的数的概率相同(即都是0.5)。给出n,求从0出发到达一个数x所需要的步数的数学期望。 http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&pro... 阅读全文

posted @ 2016-05-11 21:58 蓝空 阅读(148) 评论(0) 推荐(0) 编辑

上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 62 下一页