随笔分类 - 数学
摘要:题解见:http://blog.csdn.net/libin56842/article/details/46650209注意这里的组合数取模~~~ 1 /*Author :usedrose */ 2 /*Created Time :2015/8/7 13:31:44*/ 3 /*File Name...
阅读全文
摘要:转自http://www.cnblogs.com/keam37/p/4578568.html 1 /*Author :usedrose */ 2 /*Created Time :2015/8/7 12:26:39*/ 3 /*File Name :2.cpp*/ 4 #pragma com...
阅读全文
摘要:分情况讨论扩展欧几里得代码是按别人的思路改的。。 1 /*Author :usedrose */ 2 /*Created Time :2015/7/25 14:51:42*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #inclu...
阅读全文
摘要:A0x + B0y = knAx + By = k'n左差得(A - A0)x + (B -B0)y = 0(mod n)所以只要枚举A0, B0的倍数就行了。。公式就是 ( (i*a)%n, (i*b)%n ), i =0, 1, ... , n-1i*a, i*b如果大于n的话 不会影响结果, ...
阅读全文
摘要:转自http://blog.csdn.net/houserabbit/article/details/41513745题解写的真棒。。题目链接:http://codeforces.com/problemset/problem/487/C题目大意:构造一个1~n的排列 使得n个前缀积对n取余是一个0~...
阅读全文
摘要:简单的GCDTime Limit:1000MS Memory Limit:32768KTotal Submit:12 Accepted:4 Description 问题很简单(洁),有 T 个询问,每次询问 a,b,d ,问有多少对 (x,y) 满足 1 ≤ x ≤ a, 1 ≤ y ≤ b ,且 ...
阅读全文
摘要:3578: H1N1's ProblemDescriptionH1N1 like to solve acm problems.But they are very busy, one day they meet a problem.Given th...
阅读全文
摘要:DP 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #include13 #include14 #i...
阅读全文
摘要:扩展欧几里得简单的经典题目 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define Mod 1000000007 7 #define SMod 10007 8 #define lll __int64 9 #defin...
阅读全文
摘要:推荐文章博弈论初步:http://www.cnblogs.com/Knuth/archive/2009/09/05/1561002.html博弈解决思想:http://www.cnblogs.com/Knuth/archive/2009/09/05/1561005.htmlNIM游戏:http://...
阅读全文
摘要:*****************************************BC题解**********************************************************************1003 A Strange Problem对于操作二,利用公式当x ...
阅读全文

浙公网安备 33010602011771号