摘要: 题目http://pan.baidu.com/s/1gdfb4bht1水题 1 #include 2 #define ok(a,l,r) (((l)hehe;32 int main()33 { 34 int k=read(),p=read(),q=read(),l=read(),r=r... 阅读全文
posted @ 2015-07-26 16:16 ChenThree 阅读(227) 评论(1) 推荐(0) 编辑
摘要: 题解来自lsj大神:假设C君为(0, 0), 则右上方为(n - 1, n - 1).phi(x)即欧拉函数是少于或等于n的数中与互质的数的数目Euler函数表达通式:euler(x)=x(1-1/p1)(1-1/p2)(1-1/p3)(1-1/p4)…(1-1/pn),其中p1,p2……pn为x的... 阅读全文
posted @ 2015-07-26 12:18 ChenThree 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 按一开始没开ll。。。wa*2数论的题目总是需要绕一点弯子。。。题解来自lsj大神:一个点(x, y)的能量损失为 (gcd(x, y) - 1) * 2 + 1 = gcd(x, y) * 2 - 1.设g(i)为 gcd(x, y) = i ( 1 = 2 , i * k 2 #define ... 阅读全文
posted @ 2015-07-26 11:51 ChenThree 阅读(160) 评论(0) 推荐(0) 编辑