- 博客(91)
- 资源 (7)
- 收藏
- 关注
原创 zoj 2770 Burn the Linked Camp 差分约束
It is well known that, in the period of The Three Empires, Liu Bei, the emperor of the Shu Empire, was defeated by Lu Xun, a general of the
2011-09-28 23:05:52 711
原创 hdu 3440 House Man 差分约束
Problem DescriptionIn Fuzhou, there is a crazy super man. He can’t fly, but he could jump from housetop to housetop. Today he plans to use
2011-09-28 22:48:32 625
原创 hdu 3433 A Task Process N个人,第i个人完成一个A任务需要时间ai,完成一个B任务需要时间bi, 现在又X个任务A和Y个任务B,求完成所有任务所需要的最短时间。
Problem DescriptionThere are two kinds of tasks, namely A and B. There are N workers and the i-th worker would like to finish one task A
2011-09-26 20:30:29 4713
原创 hdu 3488 同hdu1853
#include #include #include #include using namespace std;const int N=210;const int inf=(1int n,m;//点数1->n,边数int match[N],lack
2011-09-21 12:49:33 395
原创 hdu 1853 Cyclic Tour 求图中不相交的l个环的最小权值:首先变成完全图(i->j=inf),然后取反,求最大权值,最后判断是否所有点都选到
Problem DescriptionThere are N cities in our country, and M one-way roads connecting them. Now Little Tom wants to make several cyclic tou
2011-09-21 12:46:53 688
原创 hdu 3722 Card Game 求完全图中l个不相交的环的最大权和=最优匹配 KM算法
Problem DescriptionJimmy invents an interesting card game. There are N cards, each of which contains a string Si. Jimmy wants to stick the
2011-09-21 12:26:16 645
原创 tyvj 1035 棋盘覆盖 最大匹配
给出一张n*n(n 输入格式 Input Format 第一行为n,m(表示有m个删除的格子)第二行到m+1行为x,y,分别表示删除格子所在的位置x为第x行y为第
2011-09-21 10:18:32 1103
原创 poj 2289 Jamie's Contact Groups 多重匹配
DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. Th
2011-09-21 10:03:40 892
原创 poj 1422 Air Raid 有向无环图最小路径覆盖=N-最大匹配
DescriptionConsider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that
2011-09-21 09:52:56 607
原创 poj 2594 Treasure Exploration 有向无环图最小路径覆盖变形(每个点能走多次)+FLOYD = N-最大匹配
DescriptionHave you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever ex
2011-09-21 09:48:01 475
原创 poj 3041 Asteroids 二分图最小点覆盖=最大匹配
#include#include#includeusing namespace std;const int N=600;//N不能太大 否则超时int cap[N][N];//初始化要清零int _link[N];bool used[N];int
2011-09-21 09:21:50 500
原创 poj 3041 Asteroids 最小割
DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The gr
2011-09-21 09:17:55 420
原创 poj 1325 Machine Schedule 二分图最小点覆盖=最大匹配
DescriptionAs we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history
2011-09-21 09:01:10 751
原创 poj 1469 COURSES 最大匹配
DescriptionConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine
2011-09-21 08:56:19 514
原创 zoj 1654 Place the Robots 最大匹配
Robert is a famous engineer. One day he was given a task by his boss. The background of the task was the following:Given a map consistin
2011-09-21 08:48:36 527
原创 二分图匹配模板
最大匹配 邻接矩阵#include#include#includeusing namespace std;const int N=1500;//N不能太大 否则超时int cap[N][N];//初始化要清零int _link[N];bool u
2011-09-21 08:47:55 376
原创 poj 2914 Minimum Cut 求无向图最小割集 Stoer-Wagner算法
DescriptionGiven an undirected graph, in which two vertices can be connected by multiple edges, what is the size of the minimum cut of t
2011-09-20 20:45:49 508
原创 hdu 1569 方格取数(2) 最小割
Problem Description给你一个m*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取数所在的2个格子不能相邻,并且取出的数的和最大。 Input包括多个测试实例,每个
2011-09-20 20:37:30 340
原创 poj 3204 Ikki's Story I - Road Reconstruction 找可使流量增加的割边个数 最小割+dfs
DescriptionIkki is the king of a small country – Phoenix, Phoenix is so small that there is only one city that is responsible for the
2011-09-20 20:28:22 383
原创 joj 2656: 霍格瓦兹魔法阵 最小割
最近,伏地魔开始网罗党羽, 许多女巫和男巫为了获得他赋予的力量加入了他的阵营。为了抵抗伏地魔的进攻,霍格瓦兹的魔法师们摆出了一个 n * m 方格的魔法方阵,每个方格中都站有一位魔法师。 当然,魔法师们都有自己的魔法值,用非负整数表示。 然而,对伏地魔发起攻击时,为了安全起见,任
2011-09-20 20:00:02 517
原创 zoj 2532 Internship 找出关键割边(当增加其容量后使最大流增大) 最小割+dfs
CIA headquarter collects data from across the country through its classified network. They have been using optical fibres long before it's b
2011-09-20 19:41:25 762
原创 soj 3134: windy和水星 Stoer-Wagner算法求无向图的最小割集:一个无向连通网络,去掉一个边集可以使其变成两个连通分量则这个边集就是割集;最小割集当然就权和最小的割集
Descriptionwindy被请到了水星交通部,交通部长现在想知道水星的交通安全度为多少在水星上有n座城市,任意两座城市之间有一条权值在[1,10^5]的双向路定义:为了使得这n座城市至少有两座之间不连通,最少需要破坏的权值为安全度求水星的交通安全度Input输入
2011-09-20 18:03:07 1273
原创 soj 3254: Rain and Fgj 最小割
DescriptionThere are N citys in RAIN's country.And there are M directed road between the N citys.Now she is in the city 0.And she want to
2011-09-20 17:53:24 401
原创 soj 3185: Black and white 最小割
DescriptionGiven N black rectangles and M white rectangles.You can pick some of them.But if a black rectangle and a white rectangle share
2011-09-20 17:42:02 507
原创 soj 3109: Space flight 最大权闭合图
DescriptionW教授正在为国家航天中心计划一系列的太空飞行。每次太空飞行可进行一系列商业性实验而获取利润。现已确定了一个可供选择的实验集合E={E1,E2,…,Em},和进行这些实验需要使用的全部仪器的集合I={I1,I2,…In}。实验Ej需要用到的仪器是I的子集R
2011-09-20 16:40:29 450
原创 tju 2944. Mussy Paper 最大权闭合图并输出
RoBa, an undergraduate student, is preparing for his thesis. He collects many papers about artificial intelligence, the field that he is ver
2011-09-20 16:24:50 520
原创 hdu 3987 Base Station 最大获利+最大权闭合图
Problem DescriptionA famous mobile communication company is planning to build a new set of base stations. According to the previous invest
2011-09-20 15:13:34 455
原创 hdu 3996 Gold Mine 最大权闭合图
Problem DescriptionLong long ago, there is a gold mine.The mine consist of many layout, so some area is easy to dig, but some is very hard
2011-09-20 14:52:35 501
原创 hdu 3061 Battle 最大权闭合图
Problem Description由于小白同学近期习武十分刻苦,很快被晋升为天策军的统帅。而他上任的第一天,就面对了一场极其困难的战斗:据侦查兵回报,前方共有N座城池,考虑到地势原因,最终得到一个结论:攻占某些城池之前必须攻占另外一些城池。事实上,可以把地图看做是
2011-09-20 14:39:03 613
原创 joj 2724: Hua Rong Dao 最小割
2724 Hua Rong Dao I guess you are fond of playing San Guo Sha, right? So here comes a problem of San Guo. It‟s a famous story – “Hua R
2011-09-20 13:51:20 550
原创 hdu 3987 Harry Potter and the Forbidden Forest 求将s和t隔开的最少费用下的最小边数 最小割
Problem DescriptionHarry Potter notices some Death Eaters try to slip into Castle. The Death Eaters hide in the most depths of Forbidden F
2011-09-20 13:06:33 486
原创 hdu 3526 Computer Assembling 最小割
Problem DescriptionXiaoA is becoming more and more unsatisfied with his computer since he is learning hacker technologies these days but h
2011-09-20 12:39:56 393
原创 uva 563 Crimewave
Nieuw Knollendam is a very modern town. This becomes clear already when looking at the layout of its map, which is just a rectangular grid o
2011-09-20 11:09:55 535
原创 zoj 2332 Gems
Wealthy alsomagic! Supernatural alsomagic! But also poor alsomagic! Because he is now puzzled by a problem, and will go crazy if you c
2011-09-20 10:38:22 564
原创 poj 2289 Jamie's Contact Groups
DescriptionJamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. Th
2011-09-20 09:29:09 568
原创 poj 3281 Dining
DescriptionCows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer
2011-09-19 22:12:25 318
原创 hdu 3998 Sequence 求不相交最长上升自序列个数
Problem DescriptionThere is a sequence X (i.e. x[1], x[2], ..., x[n]). We define increasing subsequence of X as x[i1], x[i2],...,x[ik]
2011-09-19 21:21:42 417
原创 zoj 2760 How Many Shortest Path 求边不相交最短路的条数(没有重边)
Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the path connecting the source vertex to the target vertex. And if two path is said to be
2011-09-19 21:02:16 631
原创 poj 3498 March of the Penguins 带点容量限制的做法是拆点,把一个点拆成两个点,他们直接连一条边就是点容量。然后再求最大流
DescriptionSomewhere near the south pole, a number of penguins are standing on a number of ice floes. Being social animals, the penguins
2011-09-19 20:35:31 717
原创 poj 3189 Steady Cow Assignment
DescriptionFarmer John's N (1 FJ would like to rearrange the cows such that the cows are as equally happy as possible, even if that
2011-09-19 19:49:25 394
拓展 KMP edtend MP
2011-04-14
joj 部分题目答案 自己做的 仅供参考
2010-07-10
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人