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

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

Please help me, the statement is: Give an matrix size n * m (n * m <= 10^6), from a square, we can move to 4 square that common side. Find the longest path that increasing

example:

3 5

1 2 2 8 9

2 3 1 7 10

1 4 5 6 1

10

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

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

longest path on DAG

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

    strictly increasing or increasing?

    what would be the answer for this testcase.

    2 2

    1 1

    1 1

    tell me?

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

      I suppose it would be strictly increasing. If it was increasing, the problem would probably be not possible to solve in polynomial time complexity for certain testcases