Напоминание: в случае технических проблем любого характера, вы можете использовать m1.codeforces.com, m2.codeforces.com, m3.codeforces.com. ×

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

Автор zeus_iitg, история, 4 года назад, По-английски

Critical Cities


Link to problem: Critical Cities

Kindly share your approach to solve this problem.

Any help is highly appreciated.

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

»
4 года назад, # |
  Проголосовать: нравится +20 Проголосовать: не нравится

That problem is a direct application of Dominator Tree.

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

    Thanx for answering. I did the same but getting a WA verdict. Mostly because i still don't understand what has to be printed as the result. Could anybody make the problem statement more clear.

    Thanx in advance

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      If you did the Dominator Tree sol, you are just supposed to print all ancestors of n on the tree. Did you forget to sort you answer? :p

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

From which website the problem is taken? I've never heard.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

My bad, the graph is directed :/

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

    Do you have code for this? How are you dealing with the fact graph is directed? I don't think this is correct unless I am greatly misunderstanding...