Square Subsets
HardRating 2000CodeforcesAdvanced DP (Bitmask, Digit, Interval)
Approach hintTry it first, then revealHide
Only the parity of each prime exponent matters, and the 19 primes below 70 give each value a 19-bit mask. Run dp[mask] over the 70 distinct values; choosing an even or an odd number of copies each gives 2^(cnt-1) ways.