Standing on the shoulders of trolls (noch nicht übersetzt)

Problem 732

N trolls are in a hole that is DN cm deep. The n-th troll is characterized by:

  • the distance from his feet to his shoulders in cm, hn
  • the length of his arms in cm, ln
  • his IQ (Irascibility Quotient), qn.

Trolls can pile up on top of each other, with each troll standing on the shoulders of the one below him. A troll can climb out of the hole and escape if his hands can reach to the surface. Once a troll escapes he cannot participate any further in the escaping effort.

The trolls execute an optimal strategy for maximizing the total IQ of the escaping trolls, defined as Q(N).

Let
rn=[(5nmod(109+7))mod101]+50
hn=r3n
ln=r3n+1
qn=r3n+2
DN=12N1n=0hn.

For example, the first troll (n=0) is 51cm tall to his shoulders, has 55cm long arms, and has an IQ of 75.

You are given that Q(5)=401 and Q(15)=941.

Find Q(1000).