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

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

Can someone give some hints to this problem from cf edu. Problem : D. Minimum maximum on the Path

Regards.

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

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится
Hint 1
Hint 2
Hint 3

Hope that helps!

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

    got it thanks

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

    hey maxwellzen thanks for the hint, but how are you proving that it will be a .....1111110000.... or .....00000011111.... type of function in x.

    I get this "If the maximum is some number x then you're only allowed to use edges with a value less than or equal to x" but how can we say that this x is the optimal answer, or no other x left or right to it?

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

      If you can connect node 1 to node n in a way such that the maximum edge has a value at most x, then you guarantee that you can connect node 1 to node n in a way such that the maximum edge has a value greater than or equal to x. Therefore, the BS check function has the form ..00000111111..

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

    can we apply dfs also ?