https://leetcode-cn.com/problems/reordered-power-of-2/
class Solution {
public:
vector<int> check(int x)
{
vector<int>ve;
while(x) ve.push_back(x%10),x/=10;
sort(ve.begin(),ve.end());
return ve;
}
bool reorderedPowerOf2(int n) {
for(int i=1;i<=1e9;i*=2)
{
if(check(i)==check(n)) return true;
}
return false;
}
};