随笔分类 - USACO
摘要:[USACO21JAN] Minimum Cost Paths P 题目描述 Farmer John 的牧草地可以看作是一个()的正方形方格组成的二维方阵(想象一个巨大的棋盘)。对于 ,从上往下第 \
阅读全文
摘要:题目描述 Bessie 找到了一个长度不超过 且仅包含字符 'C','O' 和 'W' 的字符串 。她想知道是否可以使用以下操作将该字符串变为单个字母 'C'(她最喜欢的字母): 选择两个相邻相等的字母并将其删除。 选择一个字母,将其替换为另外两个字母的任一排列。
阅读全文
摘要:[USACO22OPEN] 题目描述 奶牛们正在尝试一种相互交换编码信息的新方法,她们在相关的字母中混入不相关的字母,使信息难以解码。 奶牛们传输两个字符串 和 ,每个字符串的长度不超过 ,仅由小写字母 'a' 到 'r' 组成。为了尝试理解这条编码消息,你将被给定
阅读全文
摘要:题目描述 为了让奶牛们娱乐和锻炼,农夫约翰建造了一个美丽的池塘。这个长方形的池子被分成 了M行N列个方格(1 ≤ M, N ≤ 30)。一些格子是坚固得令人惊讶的莲花,还有一些格子是 岩石,其余的只是美丽、纯净、湛蓝的水。 贝西正在练习芭蕾舞,她站在一朵莲花上,想跳到另一朵莲花上去,她只能从一朵莲花
阅读全文
摘要:题目描述 Few know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 25 of the characters 'a'..'z'. Their cowmuni
阅读全文
摘要:题目描述 寒假到了, 头牛都要去参加一场在编号为 的牛的农场举行的派对,农场之间有 条有向路,每条路都有一定的长度。 每头牛参加完派对后都必须回家,无论是去参加派对还是回家,每头牛都会选择最短路径,求这 头牛的最短路径(一个来回)中最长的一条路径长度。 输入格式 第一行
阅读全文
摘要:题目描述 Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others. Farmer John has cooked fabu
阅读全文
摘要:题目描述 Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electron
阅读全文
摘要:题目描述 To avoid unsightly burns while tanning, each of thecows must cover her hide with sunscreen when they're at the beach. Cow i h
阅读全文
摘要:题目描述 FJ丢失了他的一头牛,他决定追回他的牛。已知FJ和牛在一条直线上,初始位置分别为x和y,假定牛在原地不动。FJ的行走方式很特别:他每一次可以前进一步、后退一步或者直接走到2*x的位置。计算他至少需要几步追上他的牛。 输入格式 第一行为一个整数t(≤10),表示数据组数;接下来每行包含一个两
阅读全文
摘要:题目描述 Farmer John has taken his cows on a trip to the city! As the sun sets, the cows gaze at the city horizon and observe the beautiful silhouettes fo
阅读全文
摘要:题目描述 FJ 知道,智商高的奶牛产奶量也大,所以他为奶牛们准备了一个翻动瓦片的益智游戏。 在一个 的方阵上(),每个格子都有一个可以翻转的瓦片。瓦片的一面是黑色,另一面是白色。对一个瓦片翻转,可以让它的颜色由黑到白,或是由白到黑。
阅读全文
摘要:题目描述 Farmer John's cows are getting restless about their poor telephone service; they want FJ to replace the old telephone wire with new, more efficie
阅读全文
摘要:题目描述 For their physical fitness program, N (2 ≤ N ≤ 1,000,000) cows have decided to run a relay race using the T (2 ≤ T ≤ 100) cow trails throughout t
阅读全文
摘要:题目描述 Bessie 可以在接下来 个小时内产奶,为了方便,我们把这 个小时 编号。 FJ 在这 个小时内有 段时间可以来给 Bessie 挤奶,第 段时间从 开始到 结束,可以得到 $Eff_i
阅读全文
摘要:题目描述 Farmer John 打算带领 ()头奶牛参加一年一度的”全美农场主大奖赛“。在这场比赛中,每个参赛者必须让他的奶牛排成一列,然后带领这些奶牛从裁判面前依此走过。 今年,竞赛委员会在接受报名时,采用了一种新的登记规则:取每头奶牛名字的首字母
阅读全文
摘要:题目描述 Farmer John wants the cows to prepare for the county jumping competition, so Bessie and the gang are practicing jumping over hurdles. They are ge
阅读全文