So Easy!

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3459    Accepted Submission(s): 1113

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
  There are several test cases, each test case in one line contains four positive integers: a, b, n, m. Where 0< a, m < 215, (a-1)2< b < a2, 0 < b, n < 231.The input will finish with the end of file.
 
Output
  For each the case, output an integer Sn.
 
Sample Input
2 3 1 2013
2 3 2 2013
2 2 1 2013
 
Sample Output
4
14
4
 
Source
 
 
 
解析:矩阵快速幂
根据共轭式的原理,(a+√b)n+(a-√b)n必为整数。
而(a-1)2< b < a2
=> a-1< √b < a
=> 0< a-√b <1
=> 0< (a-√b)n <1
所以(a+√b)n+(a-√b)n = ceil( (a+√b)n )。
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAesAAAEjCAIAAACdKr4vAAAYTklEQVR4nO3dMZLrOnbGcW7A5XCqvIKJvABGvYUpb8ARy1XeBCdyisDpVN18HDOaPdzIERfwwhveEBOoJUEkAALkAYhD/n/Be91qiQTAw08QROl2FgCgU3d2AwAAO5HgAKAVCQ4AWpHgAKAVCQ4AWpHgAKAVCQ4AWpHgAKAVCQ4AWpHgAKAVCZ6tizq7dTF6Ww7Ai/M2m96w09tyAF6c0tn05qDelgPw4pTOozcE9bYcQAhndR69Oai35QBCYmc15/ya3jHR23IAIRtn9eu05+qFh3Wv88ZhGrq+77uu63ozSzZsk96WAwhJTfCsP7VjGrphEtvaostbT2O+nc/GmHm2djYmsV0iXTil5QBK25/CsQiYhtc8XTBAs82mF91/7jR2HYTP+EuOQaEunNByAOXJJ/hseie3Z9OfluHSAZ6/ELEIwml4LEE8/79Nqgs1Wz6O495mAsgTWySJv9YO/Gkazp13Oz5SaDa9/1VBxirFei3CxgcqO4CXjUnrwrbyLX8jwYFqpN/JFJz3Oksxu3LLbco0PGeOq2e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65GcfqUVXaMU4slufy+FyIX9ylck9RheeeMcd6sN76KEvkgW1abSo4ElYxshYuGmsQhWc/+wXcyo1tR/B4IADTu2Cxg+9EkOABoRYIDgFYkOABoRYIDgFYkOABoRYIDgFb/BBie1Vo2wg7pAAAAAElFTkSuQmCC" alt="" />
接下来就可以运用矩阵快速幂求解。
 
 
 
 #include <cstdio>
#include <cstring> long long a,b,n,m; struct Mat1{
long long mat[][];
}; struct Mat2{
long long mat[][];
}; Mat1 operator * (Mat1 A,Mat1 B)
{
Mat1 ret;
memset(ret.mat,,sizeof(ret));
for(int i = ; i<; ++i)
for(int j = ; j<; ++j)
for(int k = ; k<; ++k)
ret.mat[i][j] = (ret.mat[i][j]+A.mat[i][k]*B.mat[k][j])%m;
return ret;
} Mat2 operator * (Mat1 A,Mat2 B)
{
Mat2 ret;
memset(ret.mat,,sizeof(ret));
for(int i = ; i<; ++i)
for(int j = ; j<; ++j)
for(int k = ; k<; ++k)
ret.mat[i][j] = (ret.mat[i][j]+A.mat[i][k]*B.mat[k][j])%m;
return ret;
} void matquickpowmod()
{
Mat1 x;
x.mat[][] = *a;
x.mat[][] = b-a*a;
x.mat[][] = ;
x.mat[][] = ;
Mat2 y;
y.mat[][] = *a;
y.mat[][] = ;
while(n){
if(n&)
y = x*y;
x = x*x;
n >>= ;
}
printf("%I64d\n",(y.mat[][]%m+m)%m);
} int main()
{
while(~scanf("%I64d%I64d%I64d%I64d",&a,&b,&n,&m)){
matquickpowmod();
}
return ;
}

HDU 4565 So Easy!的更多相关文章

  1. HDU 4565 So Easy!(矩阵)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4565 题意: 题意: #include <iostream>#include <cs ...

  2. HDU 4565 So Easy(矩阵解公式)

    So Easy [题目链接]So Easy [题目类型]矩阵解公式 &题解: 感觉这种类型的题都是一个套路,这题和hdu 2256就几乎是一样的. 所以最后2Xn就是答案 [时间复杂度]\(O ...

  3. HDU 4565 So Easy! 数学 + 矩阵 + 整体思路化简

    http://acm.hdu.edu.cn/showproblem.php?pid=4565 首先知道里面那个东西,是肯定有小数的,就是说小数部分是约不走的,(因为b限定了不是一个完全平方数). 因为 ...

  4. hdu 4565 So Easy! (共轭构造+矩阵快速幂)

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=4565 题目大意: 给出a,b,n,m,求出的值, 解题思路: 因为题目中出现了开根号,和向上取整后求 ...

  5. 【构造共轭函数+矩阵快速幂】HDU 4565 So Easy! (2013 长沙赛区邀请赛)

    [解题思路] 给一张神图,推理写的灰常明白了,关键是构造共轭函数,这一点实在是要有数学知识的理论基础,推出了递推式,接下来就是矩阵的快速幂了. 神图: 给个大神的链接:构造类斐波那契数列的矩阵快速幂 ...

  6. 数学(矩阵乘法):HDU 4565 So Easy!

    So Easy! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Su ...

  7. HDU 4565 So Easy!(公式化简+矩阵)

    转载:http://www.klogk.com/posts/hdu4565/ 这里写的非常好,看看就知道了啊. 题意很easy.a,b,n都是正整数.求 Sn=⌈(a+b√)n⌉%m,(a−1)2&l ...

  8. HDU 4565 So Easy!(数学+矩阵快速幂)(2013 ACM-ICPC长沙赛区全国邀请赛)

    Problem Description A sequence Sn is defined as:Where a, b, n, m are positive integers.┌x┐is the cei ...

  9. HDU 4565 So Easy! 广义斐波拉数 数论 (a+sqrt(b))^n%mod 模板

    So Easy! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Su ...

随机推荐

  1. iOS开发学习路线图

    很多初学iOS开发的人会经常问:“我想学iOS应该从何入手呢?”.作为一个做了2年多各种iOS开发的程序员,只想写写自己的一些心得体会,好和体验与不好的体验.写的不好,请多包涵.希望能起到抛砖引玉的作 ...

  2. android锁屏和finish()后activity生命周期的变化

    之前写了一个一键锁屏软件,有个朋友用了后发现了问题,所以昨天研究了一个activity在锁屏后的生命周期变化.如下: 锁屏分为两个步骤,先是锁定屏幕,再是黑屏 onCreate(在该方法里锁屏)--- ...

  3. ios实现截屏(转)

    -(UIImage*) makeImage {  UIGraphicsBeginImageContext(self.view.bounds.size);  [self.view.layer rende ...

  4. [转载]jquery ajax/post/get 传参数给 mvc的action

    jquery ajax/post/get 传参数给 mvc的action 1.ActionResult Test1     2.View  Test1.aspx 3.ajax page 4.MetaO ...

  5. hdu 1176

    简单DP  类似于在一个矩形中求最长路径 /************************************************************************* > ...

  6. POJ 1797 Heavy Transportation(Dijkstra)

    http://poj.org/problem?id=1797 题意 :给出N个城市M条边,每条边都有容量值,求一条运输路线使城市1到N的运输量最大. 思路 :用dijkstra对松弛条件进行变形.解释 ...

  7. PHP基础语法3

    文件系统 判断文件是否存在 如果只是判断文件存在,使用file_exists就行,file_exists不仅可以判断文件是否存在,同时也可以判断目录是否存在,从函数名可以看出, is_file是确切的 ...

  8. spring结合时,web.xml的配置

    <!-- 1. web.xml配置 <context-param> <param-name>webAppRootKey</param-name> <pa ...

  9. [Unity菜鸟] Unity读XML

    1. 在Unity中调试可行,发布成exe可行,发布成web不行 Application.dataPath 在Unity中调试是在“..Assets”文件夹下, 发布成exe文件是在“..yourNa ...

  10. HDU1548——A strange lift(最短路径:dijkstra算法)

    A strange lift DescriptionThere is a strange lift.The lift can stop can at every floor as you want, ...