上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页
摘要: Let N be a positive integer. There is a numerical sequence of length 3N, a=(a1,a2,…,a3N). Snuke is constructing a new sequence of length 2N, a', by re 阅读全文
posted @ 2019-01-25 13:49 NKDEWSM 阅读(214) 评论(0) 推荐(0) 编辑
摘要: There is a bar of chocolate with a height of H blocks and a width of W blocks. Snuke is dividing this bar into exactly three pieces. He can only cut t 阅读全文
posted @ 2019-01-25 13:44 NKDEWSM 阅读(276) 评论(0) 推荐(0) 编辑
摘要: You are given an integer sequence of length N, a= {a1,a2,…,aN}, and an integer K. a has N(N+1)⁄2 non-empty contiguous subsequences, {al,al+1,…,ar} (1≤ 阅读全文
posted @ 2019-01-25 13:41 NKDEWSM 阅读(179) 评论(0) 推荐(0) 编辑
摘要: You are taking a computer-based examination. The examination consists of N questions, and the score allocated to the i-th question is si. Your answer 阅读全文
posted @ 2019-01-25 13:36 NKDEWSM 阅读(190) 评论(0) 推荐(0) 编辑
摘要: There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more than one town at the same coordinates. You can bu 阅读全文
posted @ 2019-01-25 13:32 NKDEWSM 阅读(448) 评论(0) 推荐(0) 编辑
摘要: dfs你怕是要爆炸 考虑dp; 很容易想到 dp[ i ] 表示到 i 时的最少转移步数; 那么: dp[ i ]= min( dp[ i ],dp[ i-j ]+1 ); 其中 i-t<=j<=i; 当 i%k==0时 ,dp[ i ]=min( dp[ i ],dp[ i/k ]+1 ); 很明 阅读全文
posted @ 2019-01-23 23:00 NKDEWSM 阅读(521) 评论(0) 推荐(0) 编辑
摘要: 题目背景 滚粗了的HansBug在收拾旧数学书,然而他发现了什么奇妙的东西。 题目描述 蒟蒻HansBug在一本数学书里面发现了一个神奇的数列,包含N个实数。他想算算这个数列的平均数和方差。 输入输出格式 输入格式: 第一行包含两个正整数N、M,分别表示数列中实数的个数和操作的个数。 第二行包含N个 阅读全文
posted @ 2019-01-23 20:26 NKDEWSM 阅读(244) 评论(0) 推荐(0) 编辑
摘要: 题目描述 教主有着一个环形的花园,他想在花园周围均匀地种上n棵树,但是教主花园的土壤很特别,每个位置适合种的树都不一样,一些树可能会因为不适合这个位置的土壤而损失观赏价值。 教主最喜欢333种树,这3种树的高度分别为10,20,3010,20,3010,20,30。教主希望这一圈树种得有层次感,所以 阅读全文
posted @ 2019-01-23 10:44 NKDEWSM 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 先二分一个区间,再在区间里面二分即可; 可以仔细想想,想明白很有意思的; 阅读全文
posted @ 2019-01-23 09:57 NKDEWSM 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目描述 上体育课的时候,小蛮的老师经常带着同学们一起做游戏。这次,老师带着同学们一起做传球游戏。 游戏规则是这样的:nnn个同学站成一个圆圈,其中的一个同学手里拿着一个球,当老师吹哨子时开始传球,每个同学可以把球传给自己左右的两个同学中的一个(左右任意),当老师再次吹哨子时,传球停止,此时,拿着球 阅读全文
posted @ 2019-01-22 10:13 NKDEWSM 阅读(493) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 26 下一页