Has anyone solved any of these two problems using Dominator Tree?
https://cses.fi/problemset/task/1703
https://cses.fi/problemset/task/1203
Unfortunately my code is failing on a couple tests.
I'd really appreciate it if anyone provides an accepted code using Dominator Tree.
How to find Product of Divisors in this CSES Problem
for each divisor i there exist a divisor n/i such that i*(n/i)=n,so we can put the divisors into pairs of the form (i,n/i) and the product of each pair is equal to n,so the answer is (n power s/2) where s is the number of divisors,there is a case where n is perfect square then the number of divisors is odd so we just multiply the answer by sqrt(n)