摘要: Description 汉诺塔升级了:现在我们有 $N$ 个圆盘和 $N$ 个柱子,每个圆盘大小都不一样,大的圆盘不能放在小的圆盘上面,$N$ 个柱子从左到右排成一排。每次你可以将一个柱子上的最上面的圆盘移动到右边或左边的柱子上(如果移动之后是合法的话)。先在告述你初始时的状态,你希望用最少的步数将 阅读全文
posted @ 2018-02-25 15:29 aziint 阅读(124) 评论(0) 推荐(0) 编辑
摘要: Description 给你 $M$ 个质数,求 $[1,N]$ 中能被这些质数中任意一个整除的数的个数。 Input 第一行两个整数 $N,M$ 。 接下来一行 $M$ 个质数。 Output 一行一个整数代表答案。 Sample Sample Input Sample Output Limit 阅读全文
posted @ 2018-02-25 15:08 aziint 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Description Farmer John has purchased a subscription to Good Hooveskeeping magazine for his cows, so they have plenty of material to read while waitin 阅读全文
posted @ 2018-02-25 15:00 aziint 阅读(138) 评论(0) 推荐(0) 编辑
Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.