![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
矩阵
SSimpLe_Y
人一我百,人十我万,然而我做不到。
展开
-
hdu 5015 - 233 Matrix(矩阵乘法)
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. And here is the question: Suppose we have a matr原创 2017-07-29 20:34:34 · 831 阅读 · 0 评论 -
hdu 4990 Reading comprehension(矩阵乘法)
Problem DescriptionRead the program below carefully then answer the question.#pragma comment(linker, "/STACK:1024000000,1024000000")#include #include#include #include #include #inclu原创 2017-07-29 20:45:22 · 809 阅读 · 0 评论 -
hdu 4549 M斐波那契数列(矩阵乘法+降幂公式)
Problem DescriptionM斐波那契数列F[n]是一种整数数列,它的定义如下:F[0] = aF[1] = bF[n] = F[n-1] * F[n-2] ( n > 1 )现在给出a, b, n,你能求出F[n]的值吗? Input输入包含多组测试数据;每组数据占一行,包含3个整数a, b, n( 0原创 2017-07-30 13:18:21 · 1137 阅读 · 0 评论 -
hdu 4965 Fast Matrix Calculation(矩阵乘法)
Problem DescriptionOne day, Alice and Bob felt bored again, Bob knows Alice is a girl who loves math and is just learning something about matrix, so he decided to make a crazy problem for her.原创 2017-07-30 16:06:27 · 798 阅读 · 0 评论 -
UVA 11149 - Power of Matrix(矩阵乘法)
求矩阵幂次的和 就是让求:A1+A2+A3+⋯+An A^1 + A^2 + A^3 + \cdots + A^n 如果我们一个一个求A的幂次,再加起来,算一下复杂度,肯定会超时。 我们可以转化一下: 原式 = A1+A2+⋯+An/2+An/2∗(A1+A2+⋯+An/2)A^1 + A^2 + \cdots + A^{n/2} + A^{n/2}*(A^1 + A^2 + \cdots原创 2017-08-02 16:04:58 · 960 阅读 · 0 评论 -
UVA 10655 Contemplation! Algebra(矩阵乘法)
题意:求an+bna^n + b^n。 输入三个数,p,q,n p = a+b; q = a*b; n不用说了。可以把前几项列出来 a0+b0=2a^0 + b^0 = 2; a1+b1=a+ba^1 + b^1 = a+b; a2+b2=(a+b)∗(a+b)−2∗a∗ba^2 + b^2 = (a+b)*(a+b) - 2*a*b a3+b3=(a2+b2)∗(a+b)−(a2+原创 2017-08-02 18:36:34 · 963 阅读 · 0 评论 -
hdu 4565 So Easy!(矩阵乘法+共轭公式)
Problem Description A sequence Sn 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 Sn. You, a top coder, say: So easy! Input原创 2017-08-03 10:57:26 · 1536 阅读 · 0 评论 -
hdu 2256 Problem of Precision(矩阵乘法+共轭公式)
Problem DescriptionInput The first line of input gives the number of cases, T. T test cases follow, each on a separate line. Each test case contains one positive integer n. (1 <= n <= 10^9)Output For原创 2017-08-03 11:55:28 · 1681 阅读 · 0 评论 -
POJ 3150/ UVA 1386 Cellular Automaton(矩阵乘法&循环矩阵)
DescriptionA cellular automaton is a collection of cells on a grid of specified shape that evolves through a number of discrete time steps according to a set of rules that describe the new state原创 2017-08-05 16:13:11 · 758 阅读 · 0 评论