Блог пользователя Hosen_ba

Автор Hosen_ba, история, 10 месяцев назад, По-английски

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.

  • Проголосовать: нравится
  • +11
  • Проголосовать: не нравится

»
10 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to find Product of Divisors in this CSES Problem

  • »
    »
    10 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    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)

    • »
      »
      »
      10 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Thanks a lot,man. But, I tried doing exactly what u said, but couldn't get AC. Could u please share ur code for that problem?