Destroying the bus stations                                                                                     Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)                                                       …
Timer Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 445    Accepted Submission(s): 90 Problem Description Recently, some archaeologists discovered an ancient relic on a small island in the Pa…
A simple stone game                                                                                                       Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)                                             …
Description Gabiluso is one of the greatest spies in his country. Now he’s trying to complete an “impossible” mission ----- to make it slow for the army of City Colugu to reach the airport. City Colugu has n bus stations and m roads. Each road connec…
Problem Description Gabiluso is one of the greatest spies in his country. Now he's trying to complete an "impossible" mission ----- to make it slow for the army of City Colugu to reach the airport. City Colugu has n bus stations and m roads. Eac…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2485 题意:给你n个点,m条相连的边,问你最少去掉几个点使从1到n最小路径>=k,其中不能去掉1,n两个点. 题解:这个题目可以用最小流解决,也可以用IDA*  +  BFS解决. AC代码: #include <iostream> #include <cstdio> #include <cstring> #include <string> #include…
http://acm.hdu.edu.cn/showproblem.php?pid=2485 题意: 现在要从起点1到终点n,途中有多个车站,每经过一个车站为1时间,现在要在k时间内到达终点,问至少要破坏多少个车站. 思路: 把每个点拆分为两个点,容量为1,费用为0.之后相邻的车站连边,容量为INF,费用为1,表示经过一个车站需要1时间. 这样一来,跑一遍费用流计算出在费用不大于k的情况下的最大流,也就是最小割,即至少要破坏的车站数. 在网络中寻求关于f的最小费用增广路,就等价于在伴随网络中寻求…
2015 ACM / ICPC 北京站 热身赛 C题 #include<cstdio> #include<cstring> #include<cmath> #include<queue> #include<vector> #include<algorithm> using namespace std; const int INF=0x7FFFFFFF; +;//点的数量 int n,m,k; +],v[+]; int dis1[max…
题意: 最少需要几个点才能使得有向图中1->n的距离大于k. 分析: 删除某一点的以后,与它相连的所有边都不存在了,相当于点的容量为1.但是在网络流中我们只能直接限制边的容量.所以需要拆点来完成对的点容量的限制.对于边i -> j,先建边i ->i',再建i'->j.i ->i'只能建一次,容量为1,费用为0.i'->j的容量是INF.此题中因为已经有源点,所以源点(1)不能限制容量. #include<iostream> #include<cstdi…
Priest John's Busiest Day Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1420    Accepted Submission(s): 415 Problem Description John is the only priest in his town. October 26th is the John's…