Description: 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
To Search:
File list (Check if you may need any files):
4. 合并果子(final)\4. 合并果子(final)\4. 合并果子(final).vcxproj
..................\..................\4. 合并果子(final).vcxproj.filters
..................\..................\4. 合并果子.cpp
..................\4. 合并果子(final).sdf
..................\4. 合并果子(final).sln
..................\4. 合并果子(final).v12.suo
..................\4. 合并果子(final)
4. 合并果子(final)