Processing math: 100%

Problem #299

Merge it!!!

You are given an array of integers of length 1000, the array is given by the following recurrence relation: a[i]={a[i-1]^{a[i-1]}} mod (100003) and a[0]=2. You can perform the following operation on it:

In one operation you can select any two adjacent elements X and Y , remove both of them and place element X+Y in their old position. After performing this operation you score increments by X+Y .

Eg: if you combine 4 and 8 , score will increase by 12. Find the expected value of the final score after performing the operation 999 times. Report the integer part of your answer.

Contributed by Ashutosh Singh

Solved by 7 users

Log in to submit answers.

Is something wrong?

Maintaining a collection of high quality questions is our top priority. If, however, you do find an error, report the problem and we'll make sure it is reviewed soon.