2,[1,2,3,4,5]
18
树边为(1, 2), (1, 3), (2, 4), (2, 5),加密过程为(1^2)+(1^3)+(2^4)+(2^5),答案为18。样例1构成的完全二叉树为:
3,[1,2,3,4,5]
17
树边为(1, 2), (1, 3), (1, 4), (2, 5),加密过程为(1^2)+(1^3)+(1^4)+(2^5),答案为17。样例2构成的完全三叉树为:
数据满足: