摘要: 神TM 又又又又是构造题。。。。。 很简单的化简就是,把2^k[i]都换成k[i] ,然后就可以得出 对于任意的i,k[i] * a[i] >= ∑k[]。 最优的构造肯定是使 k[i] = 1 / a[i] ,为什么呢? 1.首先,∑ 1 / a[] > 1的时候一定无解,考虑把原限制条件两边都加 阅读全文
posted @ 2018-05-03 21:02 蒟蒻JHY 阅读(400) 评论(0) 推荐(0) 编辑
摘要: Discription Richard just finished building his new house. Now the only thing the house misses is a cute little wooden fence. He had no idea how to mak 阅读全文
posted @ 2018-05-03 18:52 蒟蒻JHY 阅读(331) 评论(0) 推荐(0) 编辑
摘要: 题目描述 传说很久以前,大地上居住着一种神秘的生物:地精。 地精喜欢住在连绵不绝的山脉中。具体地说,一座长度为N的山脉H可分为从左到右的N段,每段有一个独一无二的高度Hi,其中Hi是1到N之间的正整数。 如果一段山脉比所有与它相邻的山脉都高,则这段山脉是一个山峰。位于边缘的山脉只有一段相邻的山脉,其 阅读全文
posted @ 2018-05-03 18:04 蒟蒻JHY 阅读(179) 评论(0) 推荐(0) 编辑
摘要: Discription Levko has an array that consists of integers: a1, a2, ... , an. But he doesn’t like this array at all. Levko thinks that the beauty of the 阅读全文
posted @ 2018-05-03 15:01 蒟蒻JHY 阅读(282) 评论(0) 推荐(0) 编辑
摘要: Discription Levko loves strings of length n, consisting of lowercase English letters, very much. He has one such string s. For each string t of length 阅读全文
posted @ 2018-05-03 13:13 蒟蒻JHY 阅读(579) 评论(0) 推荐(0) 编辑
摘要: 题目描述 管道取珠是小X很喜欢的一款游戏。在本题中,我们将考虑该游戏的一个简单改版。游戏画面如图1所示: (图1) 游戏初始时,左侧上下两个管道分别有一定数量的小球(有深色球和浅色球两种类型),而右侧输出管道为空。每一次操作,可以从左侧选择一个管道,并将该管道中最右侧的球推入右边输出管道。 例如:我 阅读全文
posted @ 2018-05-03 11:14 蒟蒻JHY 阅读(253) 评论(0) 推荐(0) 编辑
摘要: Discription n fish, numbered from 1 to n, live in a lake. Every day right one pair of fish meet, and the probability of each other pair meeting is the 阅读全文
posted @ 2018-05-03 09:54 蒟蒻JHY 阅读(362) 评论(0) 推荐(0) 编辑