![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵快速幂
文章平均质量分 77
Lost_in_wine
QDU创新实验室
展开
-
HDOJ 4965 Fast Matrix Calculation
Fast Matrix Calculation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1113 Accepted Submission(s): 536 Problem Description O原创 2015-09-17 21:14:59 · 304 阅读 · 0 评论 -
UVA 10518 How Many Calls?
Problem J How Many Calls? Input: standard input Output: standard output Time Limit: 5 seconds The fibonacci number is defined by the following recurrence: fib(0) = 0fib(1) = 1fib(n) = fib(原创 2015-09-22 20:23:58 · 354 阅读 · 0 评论 -
HDOJ 2243 考研路茫茫——单词情结(AC自动机+矩阵快速幂)
考研路茫茫——单词情结 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4501 Accepted Submission(s): 1361 Problem Description 背单词,始终是复习英语的重要原创 2015-10-23 08:53:20 · 643 阅读 · 0 评论 -
HDOJ 4549 M斐波那契数列(矩阵快速幂 + 费马小定理)
M斐波那契数列 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2235 Accepted Submission(s): 650 Problem Description M斐波那契数列F[n]是一种整数数列,原创 2015-10-22 15:54:26 · 405 阅读 · 0 评论 -
UVa 11149 - Power of Matrix
consider an n-by-n matrix A. We define Ak = A * A * ... * A (k times). Here, * denotes the usual matrix multiplication. You are to write a program that computes the matrix A + A2 + A3 + ... + Ak.原创 2015-09-18 21:53:17 · 356 阅读 · 0 评论 -
UVA 10689 Yet another Number Sequence
#include #include const int N = 2; int MOD; struct Matrix{ int ary[N][N]; void init() { memset(ary, 0, sizeof(ary)); } Matrix() { init(); } }; const Matrix operator*(const Matrix & A, co原创 2015-09-18 19:44:02 · 1006 阅读 · 0 评论 -
UVA 11551 - Experienced Endeavour
#include #include const int N = 60; const int MOD = 1000; struct Matrix{ int ary[N][N]; void init() { memset(ary, 0, sizeof(ary)); } Matrix() { init(); } }; const Matrix operator*(cons原创 2015-09-18 15:42:17 · 409 阅读 · 0 评论 -
POJ 3070 Fibonacci
Fibonacci Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11210 Accepted: 7970 Description In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn =原创 2015-09-17 11:18:49 · 330 阅读 · 0 评论 -
HDOJ 2157 How many ways??
How many ways?? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2119 Accepted Submission(s): 782 Problem Description 春天到了, HDU校园原创 2015-09-17 11:02:08 · 275 阅读 · 0 评论 -
HDOJ 4990 Reading comprehension
Reading comprehension Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1074 Accepted Submission(s): 421 Problem Description Read原创 2015-09-17 19:21:27 · 309 阅读 · 0 评论 -
HDU 5015 233 Matrix
233 Matrix Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1515 Accepted Submission(s): 890 Problem Description In our daily li原创 2015-09-17 18:47:25 · 349 阅读 · 0 评论 -
codeforces 450B Jzzhu and Sequences
B. Jzzhu and Sequences time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Jzzhu has invented a kind of sequence原创 2015-09-17 16:51:55 · 282 阅读 · 0 评论 -
POJ 2778 DNA Sequence(AC自动机+矩阵快速幂)
Language: Default DNA Sequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 13522 Accepted: 5152 Description It's well known that DNA Sequence is a原创 2015-10-21 10:25:43 · 326 阅读 · 0 评论 -
UVA 10870 Recurrences
Recurrences Consider recurrent functions of the following form: f(n) = a1 f(n - 1) + a2 f(n - 2) + a3 f(n - 3) + ... + ad f(n - d), for n > d. a1, a2, ..., ad - arbitrary constants.原创 2015-09-22 18:45:50 · 303 阅读 · 0 评论