特殊二叉树具有以下性质:1. Each node in the tree has exactly 2 children except thleaf nodes .2. Each node is painted with white color or black color3. The color of the root node is black.4. for each non.leaf node, the color of its left child isdifferent from the color of its right child.已知树的叶子节点数是N,给定一个数组arr,大小为N,arr[i] means the number of white color nodes in the path from the root node to the i-th leaf node in the DFS order. The Dfs order in here means preorder traversal. The rootnode ofthe subtre is visited frst Then the left subtree istraversed. At last,the right subtree is traversed给定叶子节点数以及数组arr,判断是否有特殊二叉树满足数组arr的条件,如果满足就打印YES,否则打印NO。示例1输入:50 1 2 1 2输出YES示例2输入:50 3 1 2 1输出NO