摘要: 小兔的叔叔从外面旅游回来给她带来了一个礼物,小兔高兴地跑回自己的房间,拆开一看是一个棋盘,小兔有所失望。不过没过几天发现了棋盘的好玩之处。从起点(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) 编辑
摘要: The cows are having a picnic! Each of Farmer John's K (1 ≤ K ≤ 100) cows is grazing in one of N (1 ≤ N ≤ 1,000) pastures, conveniently numbered 1...N. 阅读全文
posted @ 2017-12-14 21:06 会飞的雅蠛蝶 阅读(129) 评论(0) 推荐(0) 编辑