海绵的博客

竞赛虐我千百遍,我待竞赛如初恋。 Never Give Up!!!

1131 Subway Map (30 分)

In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing s...

2018-11-23 19:24:24

阅读数:19

评论数:0

I Wanna Go Home

题目描述    The country is facing a terrible civil war----cities in the country are divided into two parts supporting different leaders. As a merchant, M...

2018-05-24 17:15:42

阅读数:43

评论数:0

Wow! Such City! HDU - 4849

Doge, tired of being a popular image on internet, is considering moving to another city for a new way of life. In his country there are N (2 ≤N≤ ...

2018-05-19 16:00:49

阅读数:17

评论数:0

算法提高 道路和航路

问题描述农夫约翰正在针对一个新区域的牛奶配送合同进行研究。他打算分发牛奶到T个城镇(标号为1..T),这些城镇通过R条标号为(1..R)的道路和P条标号为(1..P)的航路相连。每一条公路i或者航路i表示成连接城镇Ai(1<=A_i<=T)和Bi(1&a...

2018-05-19 14:28:35

阅读数:26

评论数:0

Sparse Graph hdu-5876(求补图的最短路)

Problem DescriptionIn graph theory, the complement of a graph G is a graph H on the same vertices such that two distinct vertices of H are adjacent i...

2018-05-08 14:57:37

阅读数:34

评论数:0

hdu5361 In Touch (并查集优化)

Problem Description There are n soda living in a straight line. soda are numbered by 1,2,…,n from left to right. The distance between two adjacent so...

2018-04-06 21:44:41

阅读数:36

评论数:0

结果填空:藏宝图

蒜头君得到一张藏宝图。藏宝图是一个 10×1010 \times 1010×10 的方格地图,图上一共有 101010 个宝藏。有些方格地形太凶险,不能进入。整个图只有一个地方可以出入,即是入口也是出口。蒜头君是一个贪心的人,他规划要获得所有宝藏以后...

2018-03-31 20:52:30

阅读数:71

评论数:0

L2-001. 紧急救援(最短路径的条数)

作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援队数量和每一条连接两个城市的快速道路长度都标在地图上。当其他城市有紧急求助电话给你的时候,你的任务是带领你的救援队尽快赶往事发地,同时,一路上召集尽可能多的救援队。输...

2018-03-31 11:37:58

阅读数:53

评论数:0

H. 封印之门(单向路,不知道脑子怎么了,直接就是双向路)

蒜头君被暗黑军团包围在一座岛上,所有通往近卫军团的路都有暗黑军团把手。幸运的是,小岛上有一扇上古之神打造的封印之门,可以通往近卫军团,传闻至今没有人能解除封印。封印之门上有一串文字,只包含小写字母,有 kkk 种操作规则,每个规则可以把一个字符变换成...

2018-03-29 14:59:57

阅读数:39

评论数:0

Roadblocks POJ - 3255(次短路)

Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to get to her old ho...

2018-03-12 23:58:06

阅读数:40

评论数:0

算法训练 Car的旅行路线

问题描述  又到暑假了,住在城市A的Car想和朋友一起去城市B旅游。她知道每个城市都有四个飞机场,分别位于一个矩形的四个顶点上,同一个城市中两个机场之间有一 条笔直的高速铁路,第I个城市中高速铁路了的单位里程价格为Ti,任意两个不同城市的机场之间均有航线,所有航线单位里程的价格均为t。  那么Ca...

2018-03-10 14:13:40

阅读数:32

评论数:0

Prime Path

The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit roo...

2017-11-04 01:02:32

阅读数:48

评论数:0

地铁修建 CCF

问题描述   A市有n个交通枢纽,其中1号和n号非常重要,为了加强运输能力,A市决定在1号到n号枢纽间修建一条地铁。   地铁由很多段隧道组成,每段隧道连接两个交通枢纽。经过勘探,有m段隧道作为候选,两个交通枢纽之间最多只有一条候选的隧道,没有隧道两端连接着同一个交通枢纽。   现在有n家隧...

2017-09-16 19:35:43

阅读数:138

评论数:0

Subway

You have just moved from a quiet Waterloo neighbourhood to a big, noisy city. Instead of getting to ride your bike to school every day, you now get t...

2017-09-01 23:32:56

阅读数:73

评论数:0

Invitation Cards

In the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagat...

2017-09-01 23:29:04

阅读数:92

评论数:0

Cow Contest

N (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participating in a programming contest. As we all know, some cows code better than others. Each...

2017-09-01 23:25:29

阅读数:94

评论数:0

Wormholes

  点击打开链接While  exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-wa...

2017-09-01 22:54:41

阅读数:474

评论数:0

Frogger POJ - 2253

Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but...

2017-08-26 21:20:20

阅读数:96

评论数:2

HDU - 1839 Delay Constrained Maximum Capacity Path

Consider an undirected graph with N vertices, numbered from 1 to N, and M edges. The vertex numbered with 1 corresponds to a mine from where some pre...

2017-08-07 16:25:43

阅读数:133

评论数:0

HDU - 1869 六度分离

1967年,美国著名的社会学家斯坦利·米尔格兰姆提出了一个名为“小世界现象(small world phenomenon)”的著名假说,大意是说,任何2个素不相识的人中间最多只隔着6个人,即只用6个人就可以将他们联系在一起,因此他的理论也被称为“六度分离”理论(six degrees of sep...

2017-08-07 16:23:00

阅读数:76

评论数:0

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