Counting the number of subsets of an array whose GCD is 1?

Revision en1, by wakaranai, 2022-06-23 23:07:30

Problem link

Array length n <= 100

Array elements can be up to 1e9.

If the elements were ~ 2e5 it could be done by fixing the length of subsets and counting them individually with the mobius function. But I cant think of any way to optimize this approach to work for the given constraints.

Does this problem require a completely different approach/technique?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English wakaranai 2022-06-23 23:07:30 475 Initial revision (published)