liangzihao1的博客

博客内容为本人独创,若有相似,纯属意外。

poj 3177(桥)

Description In order to get from one of the F (1 <=F <= 5,000) grazing fields (which are numbered 1..F) to another field,Bessie and the rest o...

2016-06-25 11:34:09

阅读数:114

评论数:2

poj 1144 (tju 1026)

Description ATelephone Line Company (TLC) is establishing a new telephone cable network.They are connecting several places numbered by integers from ...

2016-06-25 10:11:05

阅读数:129

评论数:2

备用交换机

题目:备用交换机 问题描述 n个城市之间有通讯网络,每个城市都有通讯交换机,直接或间接与其它城市连接。因电子设备容易损坏,需给通讯点配备备用交换机。但备用交换机数量有限,不能全部配备,只能给部分重要城市配置。于是规定:如果某个城市由于交换机损坏,不仅本城市通讯中断,还造成其它城市通讯中断,则配...

2016-06-24 21:38:29

阅读数:174

评论数:2

信与信封问题

问题描述: John先生晚上写了n封信,并相应地写了n个信封将信装好,准备寄出。但是,第二天John的儿子Small John将这n封信都拿出了信封。不幸的是,Small John无法将拿出的信正确地装回信封中了。   编程任务: 将Small John所提供的n封信依次编号为1,2,…,n;且n...

2016-06-22 13:12:48

阅读数:268

评论数:1

匹配(工作分配问题)

设有M个工人x1,x2, …, xm,和N项工作y1,y2, …, yn,规定每个工人至多做一项工作,而每项工作至多分配一名工人去做。由于种种原因,每个工人只能胜任其中的一项或几项工作。问应怎样分配才能使尽可能多的工人分配到他胜任的工作。这个问题称为人员分配问题。 人员分配问题可以用图的语言来表述...

2016-06-16 17:09:10

阅读数:214

评论数:2

poj 2749

Description FarmerJohn's farm has N barns, and there are some cows that live in each barn. Thecows like to drop around, so John wants to build some ...

2016-06-13 19:41:18

阅读数:130

评论数:2

poj 2723

Description Ratish isa young man who always dreams of being a hero. One day his friend Luffy wascaught by Pirate Arlong. Ratish set off at once to A...

2016-06-12 17:18:03

阅读数:211

评论数:2

poj 3207

Description liympanda, one of Ikki’s friend, likes playing games with Ikki.Today after minesweeping with Ikki and winning so many times, he is tired...

2016-06-10 19:57:12

阅读数:201

评论数:2

哈尔滨工业大学 1917

题目大意: 依照法律,在民主共和国Byteland,公共安全理事会的成员必须由国会确定。不幸的是,由此产生了许多问题,其中之一便是一些成员不能和睦相处。 组建理事会需符合以下要求: 每个政党都有一名代表在理事会中; 如果某两个代表互相厌恶,那么他们不能同为理事会成员。 每个政党在国会中有...

2016-06-09 21:54:34

阅读数:155

评论数:2

poj 3678

Description Katu Puzzle ispresented as a directed graph G(V, E) with eachedge e(a, b) labeled by a boolean operator op (oneof AND, OR, XOR) and an in...

2016-06-06 20:04:08

阅读数:216

评论数:2

2-SAT问题浅介绍

关于2-SAT问题: 定义:对于数组A每个Ai,数组B都有一个Bi于其相反,也就是说选Ai就一定不能选Bi。   构图:若a和b冲突,即选a时不能选b,那么选a时必须选!b(因为不选b就必须选!b,这是一个2- SAT问题必须满足的条件),那么我们就连边。同样的道理,如果选了b,那么...

2016-06-06 19:52:35

阅读数:115

评论数:2

poj 2186

Description Everycow's dream is to become the most popular cow in the herd. In a herd of N (1<= N <= 10,000) cows, you are given up to M (1 &l...

2016-06-05 20:41:32

阅读数:161

评论数:2

poj 1236

DescriptionA numberof schools are connected to a computer network. Agreements have been developedamong those schools: each school maintains a list of...

2016-06-04 11:53:47

阅读数:199

评论数:2

poj 2182

Description N (2 <=N <= 8,000) cows have unique brands in the range 1..N. In a spectaculardisplay of poor judgment, they visited the neighborh...

2016-06-01 17:18:32

阅读数:168

评论数:2

提示
确定要删除当前文章?
取消 删除
关闭
关闭