上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页
摘要: Strange Way to Express IntegersTime Limit:1000MSMemory Limit:131072KTotal Submissions:8193Accepted:2448DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choosekdifferent positive integersa1,a2,… 阅读全文
posted @ 2013-08-15 22:27 芷水 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Hello KikiTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1678 Accepted Submission(s): 587 Problem DescriptionOne day I was shopping in the supermarket. There was a cashier counting coins seriously when a little kid running and singing "门前大桥 阅读全文
posted @ 2013-08-15 21:46 芷水 阅读(240) 评论(0) 推荐(0) 编辑
摘要: Chinese remainder theorem againTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1299Accepted Submission(s): 481Problem Description我知道部分同学最近在看中国剩余定理,就这个定理本身,还是比较简单的:假设m1,m2,…,mk两两互素,则下面同余方程组:x≡a1(mod m1)x≡a2(mod m2)…x≡ak(mod mk)在011 #include12 #inclu 阅读全文
posted @ 2013-08-15 19:56 芷水 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 中国剩余定理,孙子高富帅。中国剩余定理到求解运用到了扩展欧几里得算法。求解模线性方程组(中国余数定理) a=B[1](mod W[1]) a=B[2](mod W[2]) ........ a=B[n](mod W[n]) 其中W,B已知,W[i]>0且W[i]与W[j]互质, 求a 设m1,m2,…mk是两两互素的正数,则对任意的整数b1,b2,…bk,同余方程组 x1 = b1 mod m1x2 = b2 mod m2 … xk = bk mod mk 其解为: X = (M1’*M1*b1)+(M2’*M2*b2)+…+(Mk’*Mk*bk) mod m; 其中 m = ... 阅读全文
posted @ 2013-08-15 19:17 芷水 阅读(782) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=3237Problem H:Boring CountingTime Limit: 3 SecMemory Limit: 128 MBSubmit: 6Solved: 2[Submit][Status][Discuss]DescriptionIn this problem you are given a number sequence P consisting of N integer and Pi is the ith element in the sequence. Now you task 阅读全文
posted @ 2013-08-14 17:03 芷水 阅读(294) 评论(0) 推荐(0) 编辑
摘要: http://acm.sdibt.edu.cn/JudgeOnline/problem.php?id=3232Problem C:A^X mod PTime Limit: 5 SecMemory Limit: 128 MBSubmit: 10Solved: 2[Submit][Status][Discuss]DescriptionIt's easy for ACMer to calculate A^X mod P. Now given seven integers n, A, K, a, b, m, P, and a function f(x) which defined as fol 阅读全文
posted @ 2013-08-14 11:35 芷水 阅读(334) 评论(0) 推荐(0) 编辑
摘要: Problem 1752 A^B mod CAccept: 579Submit: 2598Time Limit: 1000 mSecMemory Limit : 32768 KB Problem DescriptionGiven A,B,C, You should quickly calculate the result of A^B mod C. (1 5 #include 6 #include 7 #include 8 using namespace std; 9 10 11 12 unsigned __int64 mgml(unsigned __int64 a,unsigned __i. 阅读全文
posted @ 2013-08-12 19:10 芷水 阅读(529) 评论(0) 推荐(0) 编辑
摘要: A/BTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1147Accepted Submission(s): 887Problem Description要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。每组数据有两个数n(0 10 a=b;11 b=9973;12 c=n;13 14 */15 16 17 18 阅读全文
posted @ 2013-08-12 12:34 芷水 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 青蛙的约会Time Limit:1000MSMemory Limit:10000KTotal Submissions:81606Accepted:14116Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西... 阅读全文
posted @ 2013-08-12 09:54 芷水 阅读(286) 评论(0) 推荐(0) 编辑
摘要: RomanticTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2385Accepted Submission(s): 944Problem DescriptionThe Sky is Sprite.The Birds is Fly in the Sky.The Wind is Wonderful.Blew Throw the TreesTrees are Shaking, Leaves are Falling.Lovers Walk pass 阅读全文
posted @ 2013-08-11 19:20 芷水 阅读(368) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 33 下一页