Introduction - If you have any usage issues, please Google them yourself
In an orchard , a lot has shot down all the fruit , but also according to different types of fruit into a different heap. Toto decided to put all the fruit of the synthetic pile .
Every merger , a lot of piles of fruit can be merged together , physical consumption is equal to the weight of the fruit and piles . As can be seen , all of the fruit after n-1 times after the merger, on the left a pile . When a lot of fruit in the combined total of the physical consumption is equal to each combination of physical consumption .
Because they have to spend great efforts to put these fruits moved back home , so a lot of the fruit of the merger should save energy as much as possible . Assume that each fruit weight is 1 , and the number of species known to fruit and the number of each type of fruit , your task is to design a sequence of merger proposal , so that it takes a lot of physical minimum and the output value of this minimal physical exertion .
For example there are three kinds of