摘要: 二维前缀和 #include<bits/stdc++.h> using namespace std; const int N=5005; int f[N][N]; int get_(int x1,int y1,int x2,int y2){ return f[x1][y1]-f[x1][y2-1]- 阅读全文
posted @ 2018-12-16 22:15 lqsno1 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 将a质因数分解 S=p1^c1*b+p2^c2*b+...+pn^cn*b 根据乘法分配率可知答案=(p1^0+p1^1...+p1^c1*b)*(p2^0+p2^1...+p2^c2*b)*...*(pn^0+pn^1...+pn^cn*b) 1.如何快速求等比数列呢?我知道通项公式!S=(p^( 阅读全文
posted @ 2018-12-16 22:03 lqsno1 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 感觉自己像个智障,一道谁题都wa了3,4次。。。 我是用权值线段树(感觉代码没少多少。可能是我不会精简,很多重复的操作。) 注意以后写题不要再犯sb错误了 k<<1|1写成k>>1|1 。。。还有注意取膜 阅读全文
posted @ 2018-12-09 19:31 lqsno1 阅读(79) 评论(0) 推荐(0) 编辑