上一页 1 ··· 9 10 11 12 13
摘要: 以前做的时候好像是照抄的。。今天再做一次头脑果然还是挺乱>, 2 #define inc(i,l,r) for(i=l;i=r;i--) 4 #define inf 1e9 5 #define NM 50000+5 6 #define mem(a) memset(a,0,sizeof(a)) 7 u... 阅读全文
posted @ 2015-08-11 19:56 onlyRP 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 很早就看到了题目但看到问题缺漏就果断跳开了。。。你萌说乱搞,然后我乱搞就华丽丽的TLE了。。。至于倒着加点,脑子转不过来自己应该想不到orz 1 #include 2 #define inc(i,l,r) for(i=l;i=r;i--) 4 #define inf 1e9 5 #define me... 阅读全文
posted @ 2015-08-11 00:33 onlyRP 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 练下线段树,pushdown不把加和乘分开做就A了。。。就这被卡了好一会。虽然不造为什么,但是算了0.0 1 #include 2 #define inc(i,l,r) for(i=l;i=r;i--) 4 #define mem(a) memset(a,0.sizeof(a)) 5 #define... 阅读全文
posted @ 2015-08-10 18:04 onlyRP 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 同样是容斥原理,我昨晚调了大半天TAT,最后才发现数据范围少看了个0。。0.0真是醉了 另外还有个问题,这能用phi么。。。 1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #include<algorithm> 5 #inclu 阅读全文
posted @ 2015-08-10 11:30 onlyRP 阅读(153) 评论(1) 推荐(0) 编辑
摘要: 本来想用容斥原理,但我居然不造还有欧拉函数这个神奇的东西,果然还是太弱orz 题解orzlsj: 要求gcd(x, y) = p (1 <= x, y <= n, p为质数 ) 的数对(x, y)个数.我们枚举素数p, 令x' = x / p, y' = y / p, 则只须求 f(p) = gcd 阅读全文
posted @ 2015-08-10 11:13 onlyRP 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 ··· 9 10 11 12 13