上一页 1 2 3 4 5 6 7 ··· 23 下一页
摘要: 我们令 Ψ(x) 定义为欧拉函数。 欧拉定理描述 : 若 (a , p) = 1 , 那么 aΨ(p) Ξ 1 (mod p) . 证明: 先预热一下: Ⅰ.我们令 x1 , x2 , x3 , ……, xs 为 模p 的简化剩余系 (若果对任意的1 ≤ j ≤ s , (xj , p) = 1 并 阅读全文
posted @ 2015-09-28 08:50 92度的苍蓝 阅读(1008) 评论(0) 推荐(0) 编辑
摘要: 求[(5+2√6)2^x+1 ] mod p 的值,其中 0 ≤ x < 232 , p 是个质数,p≤ 46337 .(这里介绍的是一种暴力的做法)(5+2√6)2^n+1 = an + bn·√6 ----©,(5-2√6)2^n+1 = an - bn·√6 ;所以(5+2√6)2^n+1 +... 阅读全文
posted @ 2015-09-27 19:47 92度的苍蓝 阅读(618) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;int mod ;struct Matrix { int n , m ; int mat[4][4] ; int * operator [] (int x) { return... 阅读全文
posted @ 2015-09-24 13:28 92度的苍蓝 阅读(397) 评论(0) 推荐(0) 编辑
摘要: 最近碰到一题,问你求mod (p1*p2*p3*……*pl) ,其中n和m数据范围是1~1e18 , l≤10 , pi ≤ 1e5为不同的质数,并保证M=p1*p2*p3*……*pl≤ 1e18 。要解决这个问题首先需要Lucas定理或者C!解法。Lucas定理:我们令n=sp+q , m=tp+... 阅读全文
posted @ 2015-09-16 16:29 92度的苍蓝 阅读(699) 评论(0) 推荐(0) 编辑
摘要: Elven PostmanTime Limit: 1500/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 147Accepted Submission(s): 90Proble... 阅读全文
posted @ 2015-09-13 21:04 92度的苍蓝 阅读(201) 评论(0) 推荐(0) 编辑
摘要: B. Modulo Sumtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of numbers... 阅读全文
posted @ 2015-09-11 11:55 92度的苍蓝 阅读(310) 评论(0) 推荐(0) 编辑
摘要: H. Botstime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSasha and Ira are two best friends. But... 阅读全文
posted @ 2015-09-07 18:35 92度的苍蓝 阅读(952) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include using namespace std; const int numlen = 205; // 位数 int max(int a, int b) { return a>b?a:b; }stru... 阅读全文
posted @ 2015-09-07 18:23 92度的苍蓝 阅读(310) 评论(0) 推荐(0) 编辑
摘要: ReflectTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 288Accepted Submission(s): 174Problem Descr... 阅读全文
posted @ 2015-09-07 17:04 92度的苍蓝 阅读(357) 评论(0) 推荐(0) 编辑
摘要: //POJ 1811#include #include #include #include #include using namespace std;typedef __int64 lld;lld ran() { return rand() = mod) x -= mod;}lld mul_m... 阅读全文
posted @ 2015-08-27 18:21 92度的苍蓝 阅读(284) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 23 下一页
http://images.cnblogs.com/cnblogs_com/Running-Time/724426/o_b74124f376fc157f352acc88.jpg