摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2817二分法,时间复杂度 O(logn)用两个模版,非递归的用时少,但是不太理解。。。好吧,等比数列又名几何数列 等差数列又名算术序列 arithmetic or geometric sequences两个最基本公式:(A*B)%C = ((A%C)*(B%C))%C 和 (A+B)%C = ((A%C)+(B%C))%C递归// 15MS#include<iostream>#include<cstdio>#include<cstring>#include<strin 阅读全文
posted @ 2012-10-04 00:00 快乐. 阅读(215) 评论(0) 推荐(0) 编辑