摘要:
53 奶牛赛跑 约翰有 N 头奶牛,他为这些奶牛准备了一个周长为 C 的环形跑牛场。所有奶牛从起点同时起跑,奶牛在比赛中总是以匀速前进的,第 i 头牛的速度为 Vi。只要有一头奶牛跑完 L 圈之后,比赛就立即结束了。有时候,跑得快的奶牛可以比跑得慢的奶牛多绕赛场几圈,从而在一些时刻超过慢的奶牛。这就 阅读全文
摘要:
Cube Stacking Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N sta 阅读全文
摘要:
Navigation Nightmare Description Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 < 阅读全文
摘要:
Omi, Raymondo, Clay and Kimiko are on new adventure- in search of new Shen Gong Wu. But EvilBoy Genius Jack Spicer is also there. Omi and Jack found t 阅读全文
摘要:
Young naturalist Bill studies ants in school. His ants feed onplant-louses that live on apple trees. Each ant colony needsits own apple tree to feed i 阅读全文
摘要:
Assignment Problem Description Last year a terrible earthquake attacked Sichuan province. About 300,000 PLA soldiers attended the rescue, also ALPCs. 阅读全文
摘要:
A new Graph Game Problem Description An undirected graph is a graph in which the nodes are connected by undirected arcs. An undirected arc is an edge 阅读全文
摘要:
Going Home Problem Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either h 阅读全文
摘要:
奔小康赚大钱 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1836 Accepted Submission(s): 798 Problem D 阅读全文
摘要:
The Stable Marriage Problem Description The stable marriage problem consists of matching members of two different sets according to the member’s prefe 阅读全文
摘要:
Ladies' Choice Teenagers from the local high school have asked you to help them with the organization of next year’sProm. The idea is to find a suitab 阅读全文
摘要:
一 最短路 模型一 增加限制 例:给定一个图,求起点到终点的最短路,其中你可以使用最多k次机会使某条边的边权变为x。 解法:把每个点拆成k个点,分别表示还能使用多少次机会,构造新图。 模型二 一个点集(点非常多,不能两两建边)之间两两可到达,求最短路。 解法:新开一个点,每个点都连一条无向边到新点。 阅读全文
摘要:
Layout Description Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N 阅读全文
摘要:
【关键字】 0/1分数规划、最优比率生成树、最优比率环 【背景】 根据楼教主的回忆录,他曾经在某一场比赛中秒掉了一道最优比率生成树问题,导致很多人跟风失败,最终悲剧。可见最优比率生成树是多么凶残的东西,但是这个东西只要好好研究半天就可以掌握,相信你在看了我写的这篇总结之后可以像楼教主一般秒掉这类问题 阅读全文
摘要:
Being a knight is a very attractive career: searching for the Holy Grail, saving damsels in distress, anddrinking with the other knights are fun thing 阅读全文
摘要:
垃圾的我以前并不会树状数组区间修改+区间查询,233 第一次听到树状数组是zsl来讲课QAQ 然后当时他给我们绕了很久 = = 嗯没懂…………结果后来发现这东西实际上是个简单又好用的玩意QAQ 不知道以后的题还会不会用了 因为感觉好像树状数组的题一般都比较简单orz。。 [ 1 ] 树状数组的本职是 阅读全文
摘要:
约翰开车回家,又准备顺路买点饲料了(咦?为啥要说“又”字?)回家的路程一共有 E 公里,这一路上会经过 K 家商店,第 i 家店里有 Fi 吨饲料,售价为每吨 Ci 元。约翰打算买 N 吨饲料,他知道商家的库存是足够的,至少所有店的库存总和不会少于 N。除了购买饲料要钱,运送饲料也是要花油钱的,约翰 阅读全文
摘要:
1233: [Usaco2009Open]干草堆tower Description 奶牛们讨厌黑暗。 为了调整牛棚顶的电灯的亮度,Bessie必须建一座干草堆使得她能够爬上去够到灯泡 。一共有N大包的干草(1<=N<=100000)(从1到N编号)依靠传送带连续的传输进牛棚来。第i包干草有一个 宽度 阅读全文
摘要:
(1) n条直线最多分平面问题 题目大致如:n条直线,最多可以把平面分为多少个区域。 析:可能你以前就见过这题目,这充其量是一道初中的思考题。但一个类型的题目还是从简单的入手,才容易发现规律。当有n-1条直线时,平面最多被分成了f(n-1)个区域。则第n条直线要是切成的区域数最多,就必须与每条直线相 阅读全文
摘要:
The Ghost Blows Light Problem Description My name is Hu Bayi, robing an ancient tomb in Tibet. The tomb consists of N rooms (numbered from 1 to N) whi 阅读全文