A simple brute force problem. Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on HDU. Original ID: 497164-bit integer IO format: %I64d Java class name: Main There's a company with several projects to be done. Finish a projec…
题目 Source http://acm.hdu.edu.cn/showproblem.php?pid=4971 Description There's a company with several projects to be done. Finish a project will get you profits. However, there are some technical problems for some specific projects. To solve the proble…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3879 A famous mobile communication company is planning to build a new set of base stations. According to the previous investigation, n places are chosen as the possible new locations to build those new s…
Road constructions Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1590 Accepted Submission(s): 534 Problem Description N cities are required to connect with each other by a new transportatio…
A simple Gaussian elimination problem. Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on HDU. Original ID: 497564-bit integer IO format: %I64d Java class name: Main Dragon is studying math. One day, he drew a table with sev…
String problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5772 Description This is a simple problem about string. Now a string S contains only '0'-'9'. ?? wants to select a subsequence from this string. And makes this subsequence score maximum.…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4975 Problem Description Dragon is studying math. One day, he drew a table with several rows and columns, randomly wrote numbers on each elements of the table. Then he counted the sum of each row and col…
分析:城池之间有依赖关系,汇点与能获得兵力的城池连接,容量为可以获得的兵力,损耗兵力的城池与汇点连接容量为损耗的兵力,有依赖关系的城池间连边,容量为无穷大,跑网络流求出的最小割就是损耗的最小兵力,,, #include<stdio.h> #include<string.h> const int N=510; const int inf=0x3fffffff; int dis[N],gap[N],start,end,ans,head[N],num; struct edge { int…
hdu3879 base station : 各一个无向图,点的权是负的,边的权是正的.自己建一个子图,使得获利最大. 一看,就感觉按最大密度子图的构想:选了边那么连接的俩端点必需选,于是就以边做点,轻轻松松构造了最大权闭合图.简单题.分分钟搞定. hdu3917 :road constructions :这题题目看了半天没理解...感觉描述的不好...一个有向图,每条路有响应公司承保,若选了该公司,那么该公司的路必需全部选,还有,该公司的承保的路的下面的一条路对应公司也要选,求最大获利.构…