随笔分类 - 算法练习C++
做过的一些题目,使用C++的写程序
摘要:1021: 组合数末尾的零 Description 从m个不同元素中取出n (n ≤ m)个元素的所有组合的个数,叫做从m个不同元素中取出n个元素的组合数。组合数的计算公式如下: C(m, n) = m!/((m - n)!n!) 现在请问,如果将组合数C(m, n)写成二进制数,请问转这个二进制数
阅读全文
摘要:Crossing River Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 11814 Accepted: 4476 Description A group of N people wishes to go across a r
阅读全文
摘要:Throwing cards away I Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is&
阅读全文
摘要:A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, ... , an), the next n-tuple in the sequence is formed by
阅读全文