矩阵快速幂
文章平均质量分 84
UMR小豪
这个作者很懒,什么都没留下…
展开
-
HDU4686 Arc of Dream
Arc of Dream Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 4473 Accepted Submission(s): 1392 Problem Description An Arc of Dre原创 2017-05-11 15:45:37 · 330 阅读 · 0 评论 -
1202: GCD
Description Input The first line is an positive integer T . (1<=T<= 10^3) indicates the number of test cases. In the next T lines, there are three positive integer n, m, p (1<= n,m,p<=原创 2017-04-25 16:16:18 · 398 阅读 · 0 评论 -
poj3233 Matrix Power Series
Given a n × n matrix A and a positive integer k, find the sum S = A + A^2 + A^3 + … + A^k.S=A+A2+A3+…+Ak.S = A + A^2 + A^3 + … + A^k.Input The input contains exactly one test case. The first line of i原创 2017-08-09 00:10:40 · 235 阅读 · 0 评论 -
LinghtOJ1132 Summing up Powers
Given N and K, you have to find(1K+2K+3K+...+NK)%232(1^K + 2^K + 3^K + ... + N^K) \% 2^{32}Input Input starts with an integer T (≤ 200), denoting the number of test cases.Each case contains two intege原创 2017-08-08 00:01:19 · 354 阅读 · 1 评论 -
HDU4565 So Easy!
A sequence S n is defined as: Where a, b, n, m are positive integers.┌x┐is the ceil of x. For example, ┌3.14┐=4. You are to calculate S n. You, a top coder, say: So easy! Input There are several原创 2017-08-07 00:34:00 · 323 阅读 · 0 评论 -
LightOJ 1070 Algebraic Problem
Given the value of a+b and ab you will have to find the value of an+bn. a and b not necessarily have to be real numbers. Input Input starts with an integer T (≤ 10000), denoting the number of test c原创 2017-08-06 21:36:22 · 404 阅读 · 0 评论