ZOJ 3963 Heap Partition(贪心)
A sequence S={s1,s2,...,sn}S = \{s_1, s_2, ..., s_n\} is called heapable if there exists a binary tree T with n nodes such that every node is labelled with exactly one element from the sequence S, and