Hdu4771(杭州赛区)】的更多相关文章

Stealing Harry Potter's Precious Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1875    Accepted Submission(s): 878 Problem Description Harry Potter has some precious. For example, his invisib…
Rabbit Kingdom Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 40    Accepted Submission(s): 20 Problem Description Long long ago, there was an ancient rabbit kingdom in the forest. Every rabbit…
Gems Fight! Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 327680/327680 K (Java/Others)Total Submission(s): 114    Accepted Submission(s): 46 Problem Description Alice and Bob are playing "Gems Fight!": There are Gems of G different…
Stealing Harry Potter's Precious Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 126    Accepted Submission(s): 63 Problem Description Harry Potter has some precious. For example, his invisible…
Lights Against Dudely Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 171    Accepted Submission(s): 53 Problem Description Harry: "But Hagrid. How am I going to pay for all of this? I haven't a…
起点忘记录了,一直wa 代码写的很整齐,看着很爽 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<map> using namespace std; #define MOD 1000000007 const int INF=0x3f3f3f3f…
是平行坐标轴的,排个序搞一下就行了,卧槽,水的不行 如果不是平行的,则需要按照边长来判断…
题意:有n座岛和m条桥,每条桥上有w个兵守着,现在要派不少于守桥的士兵数的人去炸桥,只能炸一条桥,使得这n座岛不连通,求最少要派多少人去. 处理重边 边在遍历的时候,第一个返回的一定是之前去的边,所以这条边忽略,然后继续遍历,此时可以通过未遍历的边返回pre #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath> #incl…
虽然dp方程很好写,就是这个期望不知道怎么求,昨晚的BC也是 题目问题抽象之后为:在一个x坐标轴上有N个点,每个点上有一个概率值,可以修M个工作站, 求怎样安排这M个工作站的位置,使得这N个点都走到工作站的距离期望值最小? 解题报告人:SpringWater(GHQ) 解题思路:状态方程:dp[i][j]  =  min{ dp[i - 1][k - 1]  + cost[k][j]   }dp[i][j]表示在1到j修i个站,的最小期望值, cost[k][j]是我预处理的k到j这段区间修一个…
题意: 有 n+1 个城市编号 0..n,有 m 条无向边,在 0 城市有个警察总部,最多可以派出 k 个逮捕队伍,在1..n 每个城市有一个犯罪团伙,          每个逮捕队伍在每个城市可以选择抓或不抓,如果抓了 第 i  个城市的犯罪团伙,第 i-1 个城市的犯罪团伙就知道了消息  ,如果第 i-1 的犯罪 团伙之前没有被抓,任务就失败,问要抓到所有的犯罪团伙,派出的队伍需要走的最短路是多少. 分析: 最小费用最大流,需要注意的地方在于怎么去保证每个每个城市的团伙仅仅被抓一次,且在抓他…