Dining Description Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John h ...
分类:
其他好文 时间:
2016-11-21 14:38:06
阅读次数:
211
bzoj3446[Usaco2014 Feb]Cow Decathlon 题意: FJ有n头奶牛。FJ提供n种不同的技能供奶牛们学习,每头奶牛只能学习一门技能,每门技能都要有奶牛学习。 第i头奶牛学习第j门技能,FJ得到的分数S[i][j]。此外还有b个奖励,第i个奖励的格式是: Pi 、Ki 、A ...
分类:
其他好文 时间:
2016-11-17 08:08:09
阅读次数:
201
Popular Cows Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 31533 Accepted: 12817 Description Every cow's dream is to become the most popu ...
分类:
其他好文 时间:
2016-11-16 22:20:39
阅读次数:
207
题目描述 在一个夜黑风高,下着暴风雨的夜晚,farmer John的牛棚的屋顶、门被吹飞了。 好在许多牛正在度假,所以牛棚没有住满。 牛棚一个紧挨着另一个被排成一行,牛就住在里面过夜。 有些牛棚里有牛,有些没有。 所有的牛棚有相同的宽度。 自门遗失以后,farmer John必须尽快在牛棚之前竖立起 ...
分类:
其他好文 时间:
2016-11-14 20:13:24
阅读次数:
241
题目描述 The cows are having a picnic! Each of Farmer John's K (1 ≤ K ≤ 100) cows is grazing in one of N (1 ≤ N ≤ 1,000) pastures, conveniently numbered 1 ...
分类:
其他好文 时间:
2016-11-13 13:45:59
阅读次数:
216
题意:给你n(最多150)个点的坐标,给出邻接矩阵,并且整个图至少两个联通块,现在让你连接一条边,使得所有可联通的两点的最短距离的最大值最小。 题解:先dfs染色,再用floyd跑出原图的直径O($n^3$),然后枚举新增的边的端点O($n^2$),再分别找出到边端点距离最远的点($n$),那么添加 ...
分类:
其他好文 时间:
2016-11-11 01:08:33
阅读次数:
147
Description 给你一个图,两个点至多有一条路径,求最长的一条路径. \(n \leqslant 4\times 10^4\) Sol DFS?DP? 这就是一棵树,方向什么的都没用... 然后记录一下到这个点的最大值和次大值更新答案即可. Code ...
分类:
其他好文 时间:
2016-11-10 07:48:13
阅读次数:
188
Description The cows are out exercising their hooves again! There are N cows jogging on an infinitely-long single-lane track (1 <= N <= 100,000). Each ...
分类:
其他好文 时间:
2016-11-08 19:58:53
阅读次数:
219
Catch That Cow Problem Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a ...
分类:
其他好文 时间:
2016-11-07 00:50:12
阅读次数:
182
Best Cow Line Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20226 Accepted: 5563 Description FJ is about to take his N (1 ≤ N ≤ 2,000) co ...
分类:
其他好文 时间:
2016-11-07 00:47:44
阅读次数:
224