U550528 【LAR-1】Balanced Tree I
题目背景
What is a balanced tree? Maybe... A binary tree?
[//]: # (vjudge-owner:#991849)
题目描述
For a binary tree, a node is either a **left child** or a **right child** of its parent. A node may have at most one left child and one right child.
An edge between a node and its left child is called a **left edge**. An edge between a node and its right child is called a **right edge**.
We call the path from the root to a leaf node a **chain**. The **length** of a chain is the number of the nodes on the chain.
A tree's **leftmost chain** is the chain with the most left edges. A tree's **rightmost chain** is the chain with the most right edges.
A tree is **balanced** if the lengths of its leftmost chain and its rightmost chain are equal. A tree is **completely balanced** if every subtree of the tree is **balanced**.
Determine whether there exists a **completely balanced** binary tree with exactly $n$ nodes.
输入格式
The first line contains an integer $T$ — the number of test cases.
For each test case, there is a single line containing exactly one integer $n$.
输出格式
For each test case output `Yes` or `No`.
说明/提示
### Constraints
- $1\le t\le100$.
- $1\le n\le10^6$.
### Scoring
Subtask#0 is Sample. You don't get points for passing it, but you get no points in this problem if you cant pass it.
Subtask#1 has special constraints $n\le20$. You get $10$ points for passing it.
Subtask#2 has no special constraints. You get the rest $90$ points for passing it.