BYRBT
摘要: A:询问[l,r]之间有多少个能被x整除的数。这是简要的题意,分类居然是math。 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 int gcd(int a,int b) 8 { 9 if (!b) return a;10 else return gcd(b,a%b);11 }12 13 int main()14 {15 int x,y,a,b;16 scanf("%d%d%d%d",&x,&y,&a,&b);17 x=x/gcd(x,y)*y;18 printf( 阅读全文
posted @ 2013-08-31 22:29 zhonghaoxi 阅读(307) 评论(0) 推荐(0) 编辑
摘要: D:二维矩阵区间xor上一个数询问区间xor和。嘛,如果不是xor应该是没法做的吧。因为是xor,所以我们只需要考虑修改的区间的数有多少个,是奇数个还是偶数个之类的就行了,因为xor两次等于不xor嘛,所以对行列的奇偶用树状数组维护就行了。 1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 #define lb(x) ((x)&(-(x))) 8 9 const int maxn=1010;10 11 int n,m,z[2][2][maxn][maxn];12 13 void modify(int x,int 阅读全文
posted @ 2013-08-31 21:49 zhonghaoxi 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 336:http://www.cnblogs.com/zhonghaoxi/p/3330527.html337:http://www.cnblogs.com/zhonghaoxi/p/3294237.html338:http://www.cnblogs.com/zhonghaoxi/p/3294230.html339:http://www.cnblogs.com/zhonghaoxi/p/3294223.html340:http://www.cnblogs.com/zhonghaoxi/p/3293601.html341:http://www.cnblogs.com/zhonghaoxi/p/ 阅读全文
posted @ 2013-08-31 21:27 zhonghaoxi 阅读(259) 评论(0) 推荐(0) 编辑
BYRBT