### suru1206's blog

By suru1206, history, 2 weeks ago,

Given a character limit and a message, split the message up into annotated chunks without cutting words as, for example when sending the SMS

"It is an amazing experience to give tests on Doselect!!" with char limit 17, you should get

["It is an,(1/6)", "amazing(2/6)", "experience(3/6)","to give(4/6)","tests on(5/6)","Doselect!!(6/6)"]

Can anyone help me with this question in cpp?

• -18

By suru1206, history, 3 months ago,

Sourav has an array A consisting of N integers(1-based indexing), He asks you to perform the following operation M times: for i=2 to n;

A[i]=A[i]+A[i-1]

Your task is to find the xth element of the array(i.e., A[x]) after performing the above operation M times. As the answer could be large, please output it modulo 10^9+7.

INPUT The First line of input contains an integer T denoting the number of test cases. The first line of each test case contains three space-separated integers-N,x,M-denoting the size of the array ,index of the element you have to find, and the amount of times you need to repeat operation before finding the element ,respectively.The second line contains N space-separated integers A1,A2,...,A[N].

OUTPUT For each test case,output a single line containing one integer : A[x]modulo 10^9+7.

CONSTRAINTS

1<=T<=10

1<=x<=N<=10^5

1<=M<=10^18

1<=A[i]<=10^18

EXAMPLE

Input:

2

3 2 3

1 2 3

3 3 3

1 2 3

Output:

5

15

• -6

By suru1206, history, 4 months ago,

I am not getting how to solve this problem. Please help me out. This is not a live problem u can tell me approach a well.