GTY's birthday gift

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 1286    Accepted Submission(s): 502

Problem Description
FFZ's
birthday is coming. GTY wants to give a gift to ZZF. He asked his gay
friends what he should give to ZZF. One of them said, 'Nothing is more
interesting than a number multiset.' So GTY decided to make a multiset
for ZZF. Multiset can contain elements with same values. Because GTY
wants to finish the gift as soon as possible, he will use JURUO magic.
It allows him to choose two numbers a and b(a,b∈S), and add a+b
to the multiset. GTY can use the magic for k times, and he wants the
sum of the multiset is maximum, because the larger the sum is, the
happier FFZ will be. You need to help him calculate the maximum sum of
the multiset.
 
Input
Multi test cases (about 3) . The first line contains two integers n and k (2≤n≤100000,1≤k≤1000000000). The second line contains n elements ai (1≤ai≤100000)separated by spaces , indicating the multiset S .
 
Output
For each case , print the maximum sum of the multiset (mod 10000007).
 
Sample Input
3 2
3 6 2
 
Sample Output
35
 
Source
 
题意:给出一个集合s,集合中的有个初始元素集合,现在的规则是从这些元素中选出两个最大的分别为 a,b,将 a+b 重新添加进集合,然后依次操作 k 次,问最终的元素集合的和。
例如 : 3 6 2 --> 9 6 3 2 --> 15 9 6 3 2 操作两次之后结果为 35
题解:从题目中我们可以知道每次选出的两个数构成了斐波拉契数列,得到递推式 f[i] = f[i-1]+f[i-2],然后我们可以看出第i步求出的和为 sum[i] = sum[i-1]+f[i+1] = sum[i]+f[i]+f[i-1] 我们要求的最终结果是sum[k] 所以我们可以构造矩阵来做.
构造矩阵的方法如下(图丑死了。。。别怪我):
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAArUAAAE6CAIAAACHzD2GAAAWVklEQVR4nO3dUULiWBAFUNblglyPq2EzLsb50LFDYjCFhFxenfM13dMNuVSR3AbR0wcAwKXT0QcAAMTRDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJjTDwCAOf0AAJj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px8AAHP/AaXLIEuEtu3/AAAAAElFTkSuQmCC" alt="" width="516" height="233" />
解出 a - j 即可。
(sum[i],f[i+1],f[i]) = ((1,1,1),(0,1,1),(0,1,0))*(sum[i-1],f[i],f[i-1])
所以此递推式的特征矩阵为 M = ((1,1,1),(0,1,1),(0,1,0))
然后求出 A = M^k
最终结果为 A[0][0]*sum[1]+A[0][1]*f[2]+A[0][2]*f[1]
#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <algorithm>
#include <math.h>
using namespace std;
typedef long long LL;
const LL mod = ;
const int N = ;
struct Matrix
{
LL v[][];
Matrix(){memset(v,,sizeof(v));}
}ori;
LL n,k,a[N];
Matrix mult(Matrix a,Matrix b){
Matrix temp;
for(int i=;i<;i++){
for(int j=;j<;j++){
for(int k=;k<;k++){
temp.v[i][j] = (temp.v[i][j]+(a.v[i][k]*b.v[k][j])%mod)%mod;
}
}
}
return temp;
}
Matrix pow_mod(Matrix a,LL n){
Matrix ans;
for(int i=;i<;i++){
ans.v[i][i] = ;
}
while(n){
if(n&) ans = mult(ans,a);
a = mult(a,a);
n>>=;
}
return ans;
}
int main()
{
ori.v[][]=,ori.v[][]=,ori.v[][]=;
ori.v[][]=,ori.v[][]=,ori.v[][]=;
ori.v[][]=,ori.v[][]=,ori.v[][]=;
while(scanf("%lld%lld",&n,&k)!=EOF)
{
LL max1=-,max2=-,sum=;
for(int i=; i<=n; i++)
{
scanf("%lld",&a[i]);
if(a[i]>max1){
max2 = max1;
max1 = a[i];
}else if(a[i]>max2&&a[i]<=max1){
max2 = a[i];
}
sum+=a[i];
}
// printf("%lld %lld %lld\n",sum,max1,max2);
Matrix A = pow_mod(ori,k);
LL ans = (A.v[][]*sum%mod+A.v[][]*max1%mod+A.v[][]*max2%mod)%mod;
printf("%lld\n",ans);
}
return ;
}

hdu 5171(矩阵快速幂,递推)的更多相关文章

  1. ZZNU 2182 矩阵dp (矩阵快速幂+递推式 || 杜教BM)

    题目链接:http://47.93.249.116/problem.php?id=2182 题目描述 河神喜欢吃零食,有三种最喜欢的零食,鱼干,猪肉脯,巧克力.他每小时会选择一种吃一包. 不幸的是,医 ...

  2. HDU2604:Queuing(矩阵快速幂+递推)

    传送门 题意 长为len的字符串只由'f','m'构成,有2^len种情况,问在其中不包含'fmf','fff'的字符串有多少个,此处将队列换成字符串 分析 矩阵快速幂写的比较崩,手生了,多练! 用f ...

  3. hdu 2842(矩阵高速幂+递推)

    题意:一个中国环的游戏,规则是一个木棒上有n个环.第一个环是能够任意放上或拆下的,剩下的环x假设想放上或拆下必须前一个环x-1是放上的且前x-2个环所有是拆下的,问n个环最少多少次操作能够所有拆掉. ...

  4. POJ3233:Matrix Power Series(矩阵快速幂+递推式)

    传送门 题意 给出n,m,k,求 \[\sum_{i=1}^kA^i\] A是矩阵 分析 我们首先会想到等比公式,然后得到这样一个式子: \[\frac{A^{k+1}-E}{A-E}\] 发现要用矩 ...

  5. HDU 3802 矩阵快速幂 化简递推式子 加一点点二次剩余知识

    求$G(a,b,n,p) = (a^{\frac {p-1}{2}}+1)(b^{\frac{p-1}{2}}+1)[(\sqrt{a} + \sqrt{b})^{2F_n} + (\sqrt{a} ...

  6. HDU 1757 矩阵快速幂加速递推

    题意: 已知: 当x<10时:f(x)=x 否则:f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + --+ a9 * f(x-10); 求:f(x ...

  7. HDU 4686 矩阵快速幂 Arc of Dream

    由式子的性质发现都是线性的,考虑构造矩阵,先有式子,a[i] = ax * a[i-1] + ay; b[i] = bx*b[i-1] +by; a[i]*b[i] = ax*bx*a[i-1]*b[ ...

  8. hdu 5015 矩阵快速幂(可用作模板)

    转载:http://blog.csdn.net/wdcjdtc/article/details/39318847 之前各种犯傻 推了好久这个东西.. 后来灵关一闪  就搞定了.. 矩阵的题目,就是构造 ...

  9. HDU 2855 (矩阵快速幂)

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2855 题目大意:求$S(n)=\sum_{k=0}^{n}C_{n}^{k}Fibonacci(k)$ ...

随机推荐

  1. 软工实践Beta冲刺(6/7)

    队名:起床一起肝活队 组长博客:博客链接 作业博客:班级博客本次作业的链接 组员情况 组员1(队长):白晨曦 过去两天完成了哪些任务 描述: 1.界面的修改与完善 展示GitHub当日代码/文档签入记 ...

  2. 软工实践 - 第二十四次作业 Beta 冲刺(2/7)

    队名:起床一起肝活队 组长博客:https://www.cnblogs.com/dawnduck/p/10105380.html 作业博客:班级博客本次作业的链接 组员情况 组员1(队长):白晨曦 过 ...

  3. 201621123033 《Java程序设计》第11周学习总结

    1. 本周学习总结 1.1 以你喜欢的方式(思维导图或其他)归纳总结多线程相关内容. 2. 书面作业 本次PTA作业题集多线程 1. 源代码阅读:多线程程序BounceThread 1.1 BallR ...

  4. 5for Java

    ① 从字符串“耿丹计算机Java20170320”中提取日期 public class Xx1 { /** * @param args */ public static void main(Strin ...

  5. [剑指Offer] 30.连续子数组的最大和

    题目描述 HZ偶尔会拿些专业问题来忽悠那些非计算机专业的同学.今天测试组开完会后,他又发话了:在古老的一维模式识别中,常常需要计算连续子向量的最大和,当向量全为正数的时候,问题很好解决.但是,如果向量 ...

  6. [Leetcode] n queens ii n皇后问题

    Follow up for N-Queens problem. Now, instead outputting board configurations, return the total numbe ...

  7. Codeforces Round #532 (Div. 2) 题解

    Codeforces Round #532 (Div. 2) 题目总链接:https://codeforces.com/contest/1100 A. Roman and Browser 题意: 给出 ...

  8. HDU - 1880 魔咒词典~哈希入门

    哈利波特在魔法学校的必修课之一就是学习魔咒.据说魔法世界有100000种不同的魔咒,哈利很难全部记住,但是为了对抗强敌,他必须在危急时刻能够调用任何一个需要的魔咒,所以他需要你的帮助. 给你一部魔咒词 ...

  9. xiaoluo同志Linux学习之CentOS6.4

    小罗同志写的不错,弄个列表过来啊   Linux学习之CentOS(三十六)--FTP服务原理及vsfptd的安装.配置 xiaoluo501395377 2013-06-09 01:04 阅读:56 ...

  10. JavaScript 知识点之escape()与decodeURI()

    解释:escape() 函数可对字符串进行编码,这样就可以在所有的计算机上读取该字符串. 语法:escape(string)参数描述string必需.要被转义或编码的字符串. 返回值:已编码的 str ...