摘要: 线段树维护区间最小值, 简单记录下, 下标写错啦, WA到死。http://acm.hdu.edu.cn/showproblem.php?pid=4544View Code #include <iostream>#include <cstdio>#include <cstring>#include <algorithm>int f_min(int x,int y) {return x>y?y:x;}int f_max(int x,int y) {return x>y?x:y;}int f_abs(int x) {return x> 阅读全文
posted @ 2013-03-31 23:43 zhang1107 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 类似与快速幂的做法View Code /*===================================================================*\ | 两个数相乘超long long乘法的取模 mod的大小要十分注意\*===================================================================*/int multi_mod(int a,int b,int c) { //(a*b)%c int ret=0; while(b) { if(b&1) { ret+=a; if(re... 阅读全文
posted @ 2013-03-31 11:09 zhang1107 阅读(1736) 评论(0) 推荐(0) 编辑