Train Hijack

You and your friend Daneliya Tuleshova are planning to hijack a train. Your friend will go inside a cabin and she will throw valuable things through the windows. Your task is to collect it. But there are lots of things inside the cabin so she is throwing whatever she finds. There are different kinds of things in the cabin and they have different values in the market. However, you can’t just only pick valuable things. You must collect items consecutively so that the product of their market values becomes maximum. There can’t be any unpicked item between any two picked items.

This is a companion discussion topic for the original entry at