& (n - 1));
}
int main() {
int n, t;
scanf("%d", &n);
while (n--) {
scanf("%d", &t);
printf("%s\n", (is_power_two(t) ? "YES" : "NO"));
}
return 0;
}
This would likely compile into popcount if the online judge allows it
Обсуждают сегодня