摘要: 以下是本人自己的看法,如果有不对请指出: 快速幂其实就是一种简化计算幂所需时间的方法 ; 模板代码如下: 假设求 a^b%mod int res=1; while(b) { if(b&1) res=res*a%mod [1] // (b&1)是二进制的与,用于判断最低位是否有1; 这里运用了模的基本 阅读全文
posted @ 2017-01-19 12:29 HaipaiAcm 阅读(162) 评论(0) 推荐(0) 编辑
摘要: For each assingnement there is the only one line of output. On this line, there is a number, the result of expression (A1B1+A2B2+ ... +AHBH)mod M. (A1 阅读全文
posted @ 2017-01-19 10:43 HaipaiAcm 阅读(161) 评论(0) 推荐(0) 编辑