参考: 三进制实现哈夫曼:https://wenku.baidu.com/view/375dcb27aaea998fcc220e83.html 最长单调递增子序列:https://blog.csdn.net/owenchan1987/article/details/79456268