2013年3月21日

UVa11384 - Help is needed for Dexter

摘要: Problem HHelp is needed for DexterTime Limit: 3 SecondDexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at least not for Dee Dee. But Dexter does not have time to spend on this silly task, so he wants your 阅读全文

posted @ 2013-03-21 23:24 仗剑奔走天涯 阅读(179) 评论(0) 推荐(0) 编辑

UVa1346 - Songs

摘要: John Doe is a famous DJ and, therefore, has the problem of optimizing the placement of songs on his tapes. For a given tape and for each song on that tape John knows the length of the song and the frequency of playing that song. His problem is to record the songs on the tape in an order that minimiz 阅读全文

posted @ 2013-03-21 17:08 仗剑奔走天涯 阅读(299) 评论(0) 推荐(0) 编辑

UVa11464 - Even Parity

摘要: DEven ParityInput:Standard InputOutput:Standard OutputWe have a grid of sizeNxN. Each cell of the grid initially contains a zero(0) or a one(1).Theparityof a cell is the number of 1s surrounding that cell. A cell is surrounded by at most 4 cells (top, bottom, left, right).Suppose we have a grid of s 阅读全文

posted @ 2013-03-21 15:41 仗剑奔走天涯 阅读(268) 评论(0) 推荐(0) 编辑

《算法竞赛入门经典训练指南》第一章例题及习题列表

摘要: 从书籍主页搬运过来的,这样的话查看题目更方便。对与已经AC的题目我用红色字体进行了标记。问题求解策略 (General Problem Solving Techniques)例题 (Examples)例题 1UVa11292The Dragon of Loowater排序后用贪心法例题 2UVa11729Commando War用贪心法求最优排列;用“相邻交换法”证明正确性例题 3UVa11300Spreading The Wealth用代数法进行数学推导;中位数例题 4LA3708Graveyard推理;参考系例题 5UVa10881Piotr's Ants等效变换;排序例题 6LA 阅读全文

posted @ 2013-03-21 02:36 仗剑奔走天涯 阅读(783) 评论(0) 推荐(0) 编辑

UVA10881 - Piotr's Ants

摘要: Problem DPiotr's AntsTime Limit: 2 seconds"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords."Kent BrockmanPiotr likes playing with ants. He hasnof them on a horizontal poleLcm long. Each ant is facing either 阅读全文

posted @ 2013-03-21 02:19 仗剑奔走天涯 阅读(193) 评论(0) 推荐(0) 编辑

UVA10012 - How Big Is It?

摘要: How Big Is It?Ian's going to California, and he has to pack his things, including his collection of circles. Given a set of circles, your program must find the smallest rectangular box in which they fit. All circles must touch the bottom of the box. The figure below shows an acceptable packing f 阅读全文

posted @ 2013-03-21 01:55 仗剑奔走天涯 阅读(200) 评论(0) 推荐(0) 编辑

导航