上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 78 下一页
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3856题解:怎么乱搞一下都可以把代码: 1 #include 2 3 #include 4 5 #include 6 7 #include 8 9 #include10 11 #inclu... Read More
posted @ 2015-01-07 17:00 ZYF-ZYF Views(197) Comments(0) Diggs(0) Edit
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2154题意&&题解:http://www.cnblogs.com/jianglangcaijin/archive/2013/11/27/3446169.html我只是来发泄的!!!怎么每次打数论题... Read More
posted @ 2015-01-07 13:19 ZYF-ZYF Views(423) Comments(0) Diggs(0) Edit
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3831题意:有一排n棵树,第i棵树的高度是Di。MHY要从第一棵树到第n棵树去找他的妹子玩。如果MHY在第i棵树,那么他可以跳到第i+1,i+2,...,i+k棵树。如果MHY跳到一棵不矮于当前树... Read More
posted @ 2015-01-06 18:01 ZYF-ZYF Views(309) Comments(0) Diggs(0) Edit
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=3834题意:求max(gcd(i,j)) 其中 a=k这很好办,我们只要判断 b/k>(a-1)/k &&d/k>(c-1)/k 那我们枚举是个好方法,但是超时,我们发现上面的四个值每个都只有根号... Read More
posted @ 2015-01-06 17:43 ZYF-ZYF Views(376) Comments(0) Diggs(0) Edit
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=2111题意:一个1,2,...,N的排列P1,P2...,Pn是Magic的,当且仅当2Pi/2. 计算1,2,...N的排列中有多少是Magic的,答案可能很大,只能输出模P以后的值题解:注意到... Read More
posted @ 2015-01-06 13:04 ZYF-ZYF Views(346) Comments(0) Diggs(0) Edit
题目:http://www.lydsy.com/JudgeOnline/problem.php?id=1951题意:题解:我们发现模数是个质数,所以我们只需要求出指数 mod 999911659-1 的结果即可。 这是个合数=2*3*4679*35617 所以我们就可以分开来做然后CRT合并。 分开... Read More
posted @ 2015-01-06 12:48 ZYF-ZYF Views(395) Comments(0) Diggs(0) Edit
1.n,m1)p[++cnt]=n,pc[cnt]=n;}inline ll power(ll x,ll y,ll p){ ll t=1; for(;y;y>>=1,x=x*x%p) if(y&1)t=t*x%p; return t;}inline void exgc... Read More
posted @ 2015-01-04 18:34 ZYF-ZYF Views(511) Comments(1) Diggs(1) Edit
题解:考虑枚举gcd,然后问题转化为求 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #define inf 100000... Read More
posted @ 2015-01-03 12:03 ZYF-ZYF Views(292) Comments(0) Diggs(0) Edit
题解:面对这么神的题,蒟蒻只好搬运题解。。。跪烂iwtwiioi!!!http://www.cnblogs.com/iwtwiioi/p/4132095.html代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include... Read More
posted @ 2015-01-03 11:12 ZYF-ZYF Views(238) Comments(0) Diggs(0) Edit
题解:从没见过这么XXX的线段树啊。。。T_T我们考虑离线做,按1-n一个一个插入,并且维护区间【 j,i】(i为当前插入的数)j 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include ... Read More
posted @ 2015-01-02 20:35 ZYF-ZYF Views(287) Comments(0) Diggs(0) Edit
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 78 下一页