摘要: 1013 Battle Over Cities (25 分) It is vitally important to have all the cities connected by highways in a war. If a city is occupie... 阅读全文
posted @ 2019-11-18 17:11 Hu_YaYa 阅读(19) 评论(0) 推荐(0)
摘要: Tiling Description In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tiling of a 2x17 rectangle.... 阅读全文
posted @ 2019-09-07 10:59 Hu_YaYa 阅读(37) 评论(0) 推荐(0)
摘要: Ubiquitous Religions Description There are so many different religions in the world today that it is difficult to keep track of th... 阅读全文
posted @ 2019-09-06 17:23 Hu_YaYa 阅读(63) 评论(0) 推荐(0)
摘要: POJ 2586 Y2K Accounting Bug Description Accounting for Computer Machinists (ACM) has sufferred from the Y2K bug and lost some vit... 阅读全文
posted @ 2019-09-05 20:22 Hu_YaYa 阅读(15) 评论(0) 推荐(0)
摘要: The Pilots Brothers' refrigerator Description The game “The Pilots Brothers: following the stripy elephant” has a quest where ... 阅读全文
posted @ 2019-09-03 15:16 Hu_YaYa 阅读(0) 评论(0) 推荐(0)
摘要: Flip Game Description Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One s... 阅读全文
posted @ 2019-09-03 12:29 Hu_YaYa 阅读(27) 评论(0) 推荐(0)
摘要: 7-51 两个有序链表序列的合并 (20 分) 已知两个非降序链表序列S1与S2,设计函数构造出S1与S2合并后的新的非降序链表S3。 输入格式: 输入分两行,分别在每行给出由若干个正整数构成的非降序序列,用−1表示序列的结尾(−1不属于这个序列)。数字用空... 阅读全文
posted @ 2019-05-31 23:08 Hu_YaYa 阅读(44) 评论(0) 推荐(0)
摘要: 7-35 城市间紧急救援 (25 分) 作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援队数量和每一条连接两个城市的快速道路长度都标在地图上。当其他城市有紧急求助电话给你的时候,你... 阅读全文
posted @ 2019-05-31 22:46 Hu_YaYa 阅读(74) 评论(0) 推荐(0)
摘要: 7-33 地下迷宫探索 (30 分) 地道战是在抗日战争时期,在华北平原上抗日军民利用地道打击日本侵略者的作战方式。地道网是房连房、街连街、村连村的地下工事,如下图所示。 我们在回顾前辈们艰苦卓绝的战争生活的同时,真心钦佩他们的聪明才智。在现在和平发展的年代... 阅读全文
posted @ 2019-05-31 21:35 Hu_YaYa 阅读(46) 评论(0) 推荐(0)
摘要: 7-9 旅游规划 (25 分) 有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。 输入格式: ... 阅读全文
posted @ 2019-05-31 21:03 Hu_YaYa 阅读(34) 评论(0) 推荐(0)