摘要:
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 阅读全文