随笔分类 -  数学

摘要:题解见:http://blog.csdn.net/libin56842/article/details/46650209注意这里的组合数取模~~~ 1 /*Author :usedrose */ 2 /*Created Time :2015/8/7 13:31:44*/ 3 /*File Name... 阅读全文
posted @ 2015-08-07 13:42 UsedRose 阅读(196) 评论(0) 推荐(0)
摘要:转自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... 阅读全文
posted @ 2015-08-07 12:37 UsedRose 阅读(269) 评论(0) 推荐(0)
摘要:分情况讨论扩展欧几里得代码是按别人的思路改的。。 1 /*Author :usedrose */ 2 /*Created Time :2015/7/25 14:51:42*/ 3 /*File Name :2.cpp*/ 4 #include 5 #include 6 #inclu... 阅读全文
posted @ 2015-07-25 15:55 UsedRose 阅读(154) 评论(0) 推荐(0)
摘要: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的话 不会影响结果, ... 阅读全文
posted @ 2015-07-24 16:08 UsedRose 阅读(154) 评论(0) 推荐(0)
摘要:转自http://blog.csdn.net/houserabbit/article/details/41513745题解写的真棒。。题目链接:http://codeforces.com/problemset/problem/487/C题目大意:构造一个1~n的排列 使得n个前缀积对n取余是一个0~... 阅读全文
posted @ 2015-04-02 22:56 UsedRose 阅读(325) 评论(0) 推荐(0)
摘要:简单的GCDTime Limit:1000MS Memory Limit:32768KTotal Submit:12 Accepted:4 Description 问题很简单(洁),有 T 个询问,每次询问 a,b,d ,问有多少对 (x,y) 满足 1 ≤ x ≤ a, 1 ≤ y ≤ b ,且 ... 阅读全文
posted @ 2015-03-30 20:38 UsedRose 阅读(145) 评论(0) 推荐(0)
摘要:3578: H1N1's ProblemDescriptionH1N1 like to solve acm problems.But they are very busy, one day they meet a problem.Given th... 阅读全文
posted @ 2015-03-25 19:19 UsedRose 阅读(281) 评论(0) 推荐(0)
摘要:DP 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #include13 #include14 #i... 阅读全文
posted @ 2015-02-11 22:12 UsedRose 阅读(213) 评论(0) 推荐(0)
摘要:扩展欧几里得简单的经典题目 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define Mod 1000000007 7 #define SMod 10007 8 #define lll __int64 9 #defin... 阅读全文
posted @ 2015-02-11 20:50 UsedRose 阅读(132) 评论(0) 推荐(0)
摘要:推荐文章博弈论初步:http://www.cnblogs.com/Knuth/archive/2009/09/05/1561002.html博弈解决思想:http://www.cnblogs.com/Knuth/archive/2009/09/05/1561005.htmlNIM游戏:http://... 阅读全文
posted @ 2015-01-27 22:47 UsedRose 阅读(162) 评论(0) 推荐(0)
摘要:*****************************************BC题解**********************************************************************1003 A Strange Problem对于操作二,利用公式当x ... 阅读全文
posted @ 2014-12-28 10:20 UsedRose 阅读(286) 评论(0) 推荐(0)