随笔分类 -  矩阵乘法

摘要:Problem 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);And ... 阅读全文
posted @ 2015-06-20 11:57 ALXPCUN 阅读(182) 评论(0) 推荐(0)
摘要:Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are t... 阅读全文
posted @ 2015-06-19 11:44 ALXPCUN 阅读(190) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10530Accepted: 7484DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn ... 阅读全文
posted @ 2015-06-19 10:51 ALXPCUN 阅读(159) 评论(0) 推荐(0)
摘要:Problem DescriptionA为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。Input数据的第一行是一个T,表示有T组数据。每组数据的第一行有n(2 #include #include #define REP(i, s, n) for(int ... 阅读全文
posted @ 2015-06-19 09:48 ALXPCUN 阅读(214) 评论(0) 推荐(0)