矩阵快速幂
LucienShui
因为孤独是人之常态,所以陪伴才显得格外可贵。
展开
-
Matrix Power Series - POJ 3233 - 矩阵快速幂
链接: http://poj.org/problem?id=3233题目:DescriptionGiven a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak.InputThe input contains exactly one test case. The first line of原创 2017-08-06 15:53:28 · 341 阅读 · 2 评论 -
Kiki & Little Kiki 2 - HDU 2276 - 矩阵快速幂
链接: 题目:Problem Description There 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< k<= n) is the light k-1.At time of 0, some of them turn on,原创 2017-08-06 14:57:28 · 419 阅读 · 0 评论 -
Fibonacci - POJ 3070 - 矩阵快速幂
链接: http://poj.org/problem?id=3070题目:DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are:0,原创 2017-08-01 20:38:54 · 328 阅读 · 0 评论 -
233 Matrix - HDU 5015 - 矩阵快速幂
链接: http://acm.hdu.edu.cn/showproblem.php?pid=5015题目:Problem DescriptionIn our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 … in the same meaning. A原创 2017-08-06 15:16:08 · 354 阅读 · 0 评论 -
UPCOJ 4333 - Covering - 矩阵快速幂
链接: http://exam.upc.edu.cn/problem.php?id=4333题目:题目描述Bob’s school has a big playground, boys and girls always play games here after school. To protect boys and girls from getting hurt when playing ha原创 2017-08-30 23:58:45 · 1162 阅读 · 0 评论 -
[模板] - 矩阵快速幂
说明: 所有可能用到的操作已经被封装进结构体里了。用的时候根据题目再修改一下即可。实现:const int maxn = 107;int Matrixsize = 2, mod = int(1e9)+7;struct Matrix { int m[maxn][maxn]; Matrix(int i = 0) { memset(m, 0, sizeof m);原创 2017-08-01 20:42:36 · 275 阅读 · 0 评论 -
HDU-2157 - How many ways?? - 矩阵快速幂
链接: http://acm.hdu.edu.cn/showproblem.php?pid=2157题目:Problem Description春天到了, HDU校园里开满了花, 姹紫嫣红, 非常美丽. 葱头是个爱花的人, 看着校花校草竞相开放, 漫步校园, 心情也变得舒畅. 为了多看看这迷人的校园, 葱头决定, 每次上课都走不同的路线去教室, 但是由于时间问题, 每次只能经过k个地方, 比方说,原创 2017-12-09 01:57:34 · 244 阅读 · 0 评论 -
2018徐州邀请赛I - T-shirt - 矩阵快速幂
题解链接http://www.lucien.ink/archives/249/题目题目描述JSZKC is going to spend his vacation! His vacation has N days. Each day, he can choose a T-shirt to wear. Obviously, he doesn’t want to wear ...原创 2018-06-06 15:08:06 · 901 阅读 · 0 评论