<p>You are given an integer <code>n</code>. We reorder the digits in any order (including the original order) such that the leading digit is not zero.</p>

<p>Return <code>true</code> <em>if and only if we can do this so that the resulting number is a power of two</em>.</p>

<p>&nbsp;</p>
<p><strong class="example">Example 1:</strong></p>

<pre>
<strong>Input:</strong> n = 1
<strong>Output:</strong> true
</pre>

<p><strong class="example">Example 2:</strong></p>

<pre>
<strong>Input:</strong> n = 10
<strong>Output:</strong> false
</pre>

<p>&nbsp;</p>
<p><strong>Constraints:</strong></p>

<ul>
	<li><code>1 &lt;= n &lt;= 10<sup>9</sup></code></li>
</ul>

class Solution {
public:
    bool reorderedPowerOf2(int n) {
        ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
        string str_n = to_string(n);
        sort(str_n.begin(), str_n.end());
        if (str_n == "1" || str_n == "2" || str_n == "4" || str_n == "8") return true;
        if (str_n == "16" || str_n == "23" || str_n == "46") return true;
        if (str_n == "128" || str_n == "256" || str_n == "125") return true;
        if (str_n == "0124" || str_n == "0248" || str_n == "0469" || str_n == "1289") return true;
        if (str_n == "13468" || str_n == "23678" || str_n == "35566") return true;
        if (str_n == "011237" || str_n == "122446" || str_n == "224588") return true;
        if (str_n == "0145678" || str_n == "0122579" || str_n == "0134449" || str_n == "0368888") return true;
        if (str_n == "11266777" || str_n == "23334455" || str_n == "01466788") return true;
        if (str_n == "112234778" || str_n == "234455668" || str_n == "012356789") return true;
    return false;
    }
};
7300