题目描述 Farmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy ...
分类:
其他好文 时间:
2018-02-10 21:22:46
阅读次数:
140
BZOJ_2058_[Usaco2010 Nov]Cow Photographs_逆序对 题意: 奶牛的图片 Farmer John希望给他的N(1<=N<=100,000)只奶牛拍照片,这样他就可以向他的朋友炫耀他的奶牛.这N只奶牛被标号为1..N. 在照相的那一天,奶牛们排成了一排.其中第i个位 ...
分类:
其他好文 时间:
2018-02-10 16:56:40
阅读次数:
167
题目链接 "bzoj 1717: [Usaco2006 Dec]Milk Patterns 产奶的模式" 题解 后缀排序 求出height之后一段区间[l,r]内,出现r l+1次最长的串是$min(height[i]) l include include const int maxn = 6000 ...
分类:
其他好文 时间:
2018-02-09 22:34:04
阅读次数:
153
题目 题目描述 Farmer John has decided to bring water to his N (1 <= N <= 300) pastures which are conveniently numbered 1..N. He may bring water to a pasture ...
分类:
其他好文 时间:
2018-02-07 15:09:25
阅读次数:
162
题目 题目描述 Bessie and her sister Elsie want to travel from the barn to their favorite field, such that they leave at exactly the same time from the barn, ...
分类:
其他好文 时间:
2018-02-06 01:06:59
阅读次数:
175
Description 约翰到奶牛商场里买工具.商场里有K(1≤K≤100).种工具,价格分别为1,2,…,K美元.约翰手里有N(1≤N≤1000)美元,必须花完.那他有多少种购买的组合呢? Input A single line with two space separated integers: ...
分类:
其他好文 时间:
2018-02-04 19:42:00
阅读次数:
149
题目描述 看下面的五张 9 x 8 的图像: ........ ........ ........ ........ .CCC.... EEEEEE.. ........ ........ ..BBBB.. .C.C.... E....E.. DDDDDD.. ........ ..B..B.. . ...
分类:
其他好文 时间:
2018-02-04 15:36:15
阅读次数:
157
Description 公交车一共经过N(1 include include include include define inf 0x7f7f7f typedef long long ll; typedef unsigned int ui; typedef unsigned long long u ...
分类:
其他好文 时间:
2018-02-04 00:31:01
阅读次数:
93
【题解】 最短路裸题。。 本题要求出每个点到终点走最短路来回的距离,因此我们先跑一遍最短路得出每个点到终点的最短距离,然后把边反向再跑一遍最短路,两次结果之和即是答案。 ...
分类:
其他好文 时间:
2018-02-02 14:10:24
阅读次数:
102
【题解】 弗洛伊德。更新距离的时候把$f[i][j]=min(f[i][j],f[i][k]+f[k][j])$改为$f[i][j]=min(f[i][j],max(f[i][k],f[k][j]))$. ...
分类:
其他好文 时间:
2018-02-02 11:56:49
阅读次数:
194