Being a Hero Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1211 Accepted Submission(s): 381 Special Judge Problem Description You are the hero who saved your country. As promised, the ki…
Game Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1563 Accepted Submission(s): 664 Problem Description onmylove has invented a game on n × m grids. There is one positive integer on each gr…
和HDU 1565是一道题,只是数据加强了,貌似轮廓线DP来不了了. #include <cstdio> #include <cstring> #include <queue> #include <vector> #define maxn 2510 #define oo 0x3f3f3f3f using namespace std; struct Edge { int u, v, f; Edge( int u, int v, int f ):u(u),v(v…
Problem DescriptionYou are the hero who saved your country. As promised, the king will give you some cities of the country, and you can choose which ones to own!But don't get too excited. The cities you take should NOT be reachable from the capital -…
题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=2485 Destroying the bus stations Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2651 Accepted Submission(s): 891 Problem Description Gabi…
Problem A simple brute force problem (HDU 4971) 题目大意 有n个项目和m个问题,完成每个项目有对应收入,解决每个问题需要对应花费,给出每个项目需解决的问题以及各问题间的依赖关系,求最大利润. 解题分析 最大权闭合子图 用来解决一下有依赖关系的问题. X集权值为正,Y集权值为负.X集的某些点依赖于Y集,Y集的某些点互相依赖. 从S向X集的每个点连流量为权值的边,y集的每个点向T连流量为权值的边,若两个点互相依赖,则连一条权值为INF的边. 求一遍最…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3046 In ZJNU, there is a well-known prairie. And it attracts pleasant sheep and his companions to have a holiday. Big big wolf and his families know about this, and quietly hid in the big lawn. As ZJNU A…
http://acm.hdu.edu.cn/showproblem.php?pid=4289 Control Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2247 Accepted Submission(s): 940 Problem Description You, the head of Department of Secu…
Barricade Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 997 Accepted Submission(s): 306 Problem Description The empire is under attack again. The general of empire is planning to defend his…
HDU 3046 Pleasant sheep and big big wolf 题目链接 题意:一个n * m平面上,1是羊.2是狼,问最少要多少围墙才干把狼所有围住,每有到达羊的路径 思路:有羊和狼.要分成两个集合互不可达.显然的最小割.建图源点连狼,容量无穷,羊连汇点,容量无穷.然后相邻格子连边.容量为1 代码: #include <cstdio> #include <cstring> #include <queue> #include <algorithm…
Smallest Minimum Cut Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1181 Accepted Submission(s): 473 Problem Description Consider a network G=(V,E) with source s and sink t. An s-t cut is a…
Give out candies Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 218 Accepted Submission(s): 66 Problem Description There are n children numbered 1 to n, and HazelFan's task is to give out…