恒邪

2014年4月20日 #

[2011山东ACM省赛] Binomial Coeffcients(求组合数)

摘要: Binomial CoeffcientsTime Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述输入输出示例输入31 110 2954 723示例输出1453557658提示来源山东省第二届ACM大学生程序设计竞赛解题思路:这道题坑死我了。。本来很简单的一道题,却怎么也做不对。。就是求组合数,结果对10000003取模。一开始对c(m,n)是用公式直接求的,但是计算过程中涉及到取余,不能用以下代码写:int c(int m,int n){ int sum=1; for(int i=1;i#include using namespac... 阅读全文

posted @ 2014-04-20 17:57 恒邪 阅读(211) 评论(0) 推荐(0) 编辑

[2011山东ACM省赛] Mathman Bank(模拟题)

摘要: Mathman BankTime Limit: 1000ms Memory limit: 65536K有疑问?点这里^_^题目描述With the development of mathmen's mathematics knowlege, they have finallyinvented computers. Therefore, they want to use computers to manage theirbanks. However, mathmen's programming skills are not as good as theirmath- ematic 阅读全文

posted @ 2014-04-20 17:30 恒邪 阅读(169) 评论(0) 推荐(0) 编辑

导航