线性递推式(CCF201809-05)

线性递推式(CCF201809-05)_第1张图片

样例输入

3 3 6
2 0 4

样例输出

12
32
80
208

样例说明

样例输入

2 1 11
1 1

样例输出

1
2
3
5
8
13
21
34
55
89
144

样例说明

样例输入

10 10 20
532737790 634932889 335818534 101179174 977780682 695192541 779962395 295668292 157661238 325351676

样例输出

119744921
651421717
601080475
163399777
291546699
108479226
406175654
344671679
459752012
489415425
349454810

数据规模和约定

 

#include 

/* run this program using the console pauser or add your own getch, system("pause") or input loop */
using namespace std;
 
int main(int argc, char *argv[]) 
{
	long int m;
	unsigned long long  int a[100010];
	unsigned long long  int r,l,k[100010];
	cin>>m>>r>>l;
	a[0]=1;
	for(long int i=1;i<=m;i++)
		cin>>k[i];
	for(long int i=1;i

 

你可能感兴趣的:(算法,C++)