上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页
摘要: 有一个无限大的矩形,初始时你在左上角(即第一行第一列),每次你都可以选择一个右下方格子,并瞬移过去(如从下图中的红色格子能直接瞬移到蓝色格子),求到第nn行第mm列的格子有几种方案,答案对10000000071000000007取模。 Input多组测试数据。 两个整数n,m(2≤n,m≤10000 阅读全文
posted @ 2017-12-19 16:13 会飞的雅蠛蝶 阅读(235) 评论(0) 推荐(0) 编辑
摘要: In your childhood, do you crazy for collecting the beautiful cards in the snacks? They said that, for example, if you collect all the 108 people in th 阅读全文
posted @ 2017-12-19 15:36 会飞的雅蠛蝶 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Given a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime to N. Two integers are said to be 阅读全文
posted @ 2017-12-19 15:19 会飞的雅蠛蝶 阅读(132) 评论(0) 推荐(0) 编辑
摘要: LazyChild is a lazy child who likes candy very much. Despite being very young, he has two large candy boxes, each contains n candies initially. Everyd 阅读全文
posted @ 2017-12-19 15:15 会飞的雅蠛蝶 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 小兔的叔叔从外面旅游回来给她带来了一个礼物,小兔高兴地跑回自己的房间,拆开一看是一个棋盘,小兔有所失望。不过没过几天发现了棋盘的好玩之处。从起点(0,0)走到终点(n,n)的最短路径数是C(2n,n),现在小兔又想如果不穿越对角线(但可接触对角线上的格点),这样的路径数有多少?小兔想了很长时间都没想 阅读全文
posted @ 2017-12-14 21:40 会飞的雅蠛蝶 阅读(131) 评论(0) 推荐(0) 编辑
摘要: This is a small but ancient game. You are supposed to write down the numbers 1, 2, 3, . . . , 2n - 1, 2n consecutively in clockwise order on the groun 阅读全文
posted @ 2017-12-14 21:36 会飞的雅蠛蝶 阅读(156) 评论(0) 推荐(0) 编辑
摘要: Two positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all rela 阅读全文
posted @ 2017-12-14 21:28 会飞的雅蠛蝶 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Z城市居住着很多只跳蚤。在Z城市周六生活频道有一个娱乐节目。一只跳蚤将被请上一个高空钢丝的正中央。钢丝很长,可以看作是无限长。节目主持人会给该跳蚤发一张卡片。卡片上写有N+1个自然数。其中最后一个是M,而前N个数都不超过M,卡片上允许有相同的数字。跳蚤每次可以从卡片上任意选择一个自然数S,然后向左, 阅读全文
posted @ 2017-12-14 21:18 会飞的雅蠛蝶 阅读(197) 评论(0) 推荐(0) 编辑
摘要: Computing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Challenges are t 阅读全文
posted @ 2017-12-14 21:09 会飞的雅蠛蝶 阅读(226) 评论(0) 推荐(0) 编辑
摘要: In how many ways can you choose k elements out of n elements, not taking order into account? Write a program to compute this number. Input The input w 阅读全文
posted @ 2017-12-14 21:07 会飞的雅蠛蝶 阅读(168) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 14 下一页