思维
文章平均质量分 66
Cherish_lii
这个作者很懒,什么都没留下…
展开
-
Pride -codeforces 892C
题目 You have an array a with length n, you can perform operations. Each operation is like this: choose two adjacent elements from a, say x and y, and replace one of them with gcd(x, y), where gcd...原创 2018-11-27 15:17:41 · 240 阅读 · 0 评论 -
Minimal coverage _最小区间覆盖 UVA 10020
题目:The ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the segment [0,M].The Inpu...原创 2018-12-01 15:17:05 · 217 阅读 · 0 评论 -
Jolly Jumpers_UVA10038
题目 A sequence of n > 0 integers is called a jolly jumper if the absolute values of the difference between successive elements take on all the values 1 through n − 1. For instance, 1 4 2 3 is a ...原创 2018-12-05 11:25:33 · 328 阅读 · 0 评论 -
历届试题 k倍区间
题目问题描述 给定一个长度为N的数列,A1, A2, ... AN,如果其中一段连续的子序列Ai, Ai+1, ... Aj(i <= j)之和是K的倍数,我们就称这个区间[i, j]是K倍区间。 你能求出数列中总共有多少个K倍区间吗?输入格式 第一行包含两个整数N和K。(1 <= N, K <= 100000) 以下N行每行包含一个整数Ai。(1...原创 2019-03-05 11:23:03 · 626 阅读 · 2 评论 -
算法训练 审美课
题目问题描述 《审美的历程》课上有n位学生,帅老师展示了m幅画,其中有些是梵高的作品,另外的都出自五岁小朋友之手。老师请同学们分辨哪些画的作者是梵高,但是老师自己并没有答案,因为这些画看上去都像是小朋友画的……老师只想知道,有多少对同学给出的答案完全相反,这样他就可以用这个数据去揭穿披着皇帝新衣的抽象艺术了(支持帅老师^_^)。 答案完全相反是指对每一幅画的判断都相反。输入格...原创 2019-02-27 13:58:05 · 168 阅读 · 0 评论