The numbers are written on a blackboard. Each minute, a student goes to the blackboard,chooses two numbers and , erases them and writes a new number on the blackboard. This process continues till only one number remains on the blackboard. Find the remainder when the maximum possible value of is divided by .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Let x 1 + x 2 + . . . + x 2 0 1 1 + x 2 0 1 2 be some permutation of the list
I deduced a greddy aproach to perform the operations and get that the maximum computation of N (I'll put a proof of this later).
N = ( i = 1 ∑ 2 0 1 1 2 i × x i ) + 2 2 0 1 1 ∗ x 2 0 1 2
The permutation of the list that maximizes N is one such that for every element x i , x i = i
So let's rewritte N as N = ( i = 1 ∑ 2 0 1 1 2 i × i ) + 2 2 0 1 1 ∗ 2 0 1 2
Now here is a little bit of Javascript to make the computation.
The code bellow prints out the requested answer wich is 5 3 8