摘要: 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 阅读(184) 评论(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 阅读(146) 评论(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 阅读(207) 评论(0) 推荐(0) 编辑