上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页
摘要: Problem 1759 Super A^B mod CAccept: 456Submit: 1488Time Limit: 1000 mSecMemory Limit : 32768 KB Problem DescriptionGiven A,B,C, You should quickly calculate the result of A^B mod C. (111 #include12 #include13 #include14 using namespace std;15 16 char b[1000005];17 18 __int64 Euler(__int64 n)19 {20 . 阅读全文
posted @ 2013-08-27 08:30 芷水 阅读(1689) 评论(0) 推荐(0) 编辑
摘要: Kiki & Little Kiki 2Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1659Accepted Submission(s): 837Problem DescriptionThere are n lights in a circle numbered from 1 to n. The left of light 1 is light n, and the left of light k (1= 0), if the le 阅读全文
posted @ 2013-08-20 09:41 芷水 阅读(332) 评论(0) 推荐(0) 编辑
摘要: Another kind of FibonacciTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1219Accepted Submission(s): 466Problem DescriptionAs we all known , the Fibonacci series : F(0) = 1, F(1) = 1, F(N) = F(N - 1) + F(N - 2) (N >= 2).Now we define another kin 阅读全文
posted @ 2013-08-19 18:20 芷水 阅读(167) 评论(0) 推荐(0) 编辑
摘要: Tr ATime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1994 Accepted Submission(s): 1472 Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 2 #include 3 #include 4 #include 5 using namespace std;. 阅读全文
posted @ 2013-08-18 22:54 芷水 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 矩阵是一个很好的工具,参考别人到博客:http://mindlee.net/2011/11/21/matrix-multiply/经典矩阵相乘10题,大牛博客 http://www.matrix67.com/blog/archives/276/ 1 /* 2 矩阵的运用很宽泛 3 */ 4 #include 5 #include 6 #include 7 #include 8 #define N 100 9 #define mod 10000007 10 using namespace std; 11 12 struct Matrix 13 { 14 int mat... 阅读全文
posted @ 2013-08-18 12:25 芷水 阅读(263) 评论(0) 推荐(0) 编辑
摘要: A Simple Math ProblemTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1838Accepted Submission(s): 1053Problem DescriptionLele now is thinking about a simple function f(x).If x = 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);A 阅读全文
posted @ 2013-08-18 12:06 芷水 阅读(197) 评论(0) 推荐(0) 编辑
摘要: FibonacciTime Limit:1000MSMemory Limit:65536KTotal Submissions:7715Accepted:5474DescriptionIn the Fibonacci integer sequence,F0= 0,F1= 1, andFn=Fn− 1+Fn− 2forn≥ 2. For example, the first ten terms of the Fibonacci sequence are:0, 1, 1, 2, 3, 5, 8, 13, 21, 34, …An alternative formula for the Fibonacc 阅读全文
posted @ 2013-08-17 12:57 芷水 阅读(205) 评论(0) 推荐(0) 编辑
摘要: C LooooopsTime Limit:1000MSMemory Limit:65536KTotal Submissions:15066Accepted:3820DescriptionA Compiler Mystery: We are given a C-language style for loop of typefor (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to value A and while variable is . 阅读全文
posted @ 2013-08-17 09:58 芷水 阅读(242) 评论(0) 推荐(0) 编辑
摘要: X问题Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2522Accepted Submission(s): 790Problem Description求在小于等于N的正整数中有多少个X满足:X mod a[0] = b[0], X mod a[1] = b[1], X mod a[2] = b[2], …, X mod a[i] = b[i], … (0 2 #include 3 #include 4 #include 5 usi... 阅读全文
posted @ 2013-08-16 11:16 芷水 阅读(332) 评论(0) 推荐(0) 编辑
摘要: BiorhythmsTime Limit:1000MSMemory Limit:10000KTotal Submissions:103539Accepted:32012DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods o 阅读全文
posted @ 2013-08-16 09:53 芷水 阅读(209) 评论(0) 推荐(0) 编辑
上一页 1 ··· 20 21 22 23 24 25 26 27 28 ··· 33 下一页