___---___'s blog

By ___---___, history, 7 years ago, In English

Given an n x m matrix filled with non negative values. Each value in a cell represents a weighted edge to reach each of its adjacent cells. We need to calculate the shortest path from 1,1 to n,m after each of the q queries. They are of two types Type 1 : block cell x,y Type 2 : unblock cell x,y How can we achieve this? n,m <= 1000 q <= 1000

  • Vote: I like it
  • -14
  • Vote: I do not like it

»
7 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Please, can you give a link to this problem? If not possible, please mention where you got it from. Also, should we only move down/right or we are allowed to move in all four directions?

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    We can not move diagonally. We can move in other four directions. There is no link. I thought of this problem.

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +12 Vote: I do not like it

      WHEN YOU ASK FOR HELP ON A PROBLEM YOU CAME UP WITH, YOU MENTION THAT IN THE BLOG AND DO NOT FKIN PUT CONSTRAINTS! OTHERWISE, YOU MAY BE WASTING MANY PEOPLE'S TIME!

      • »
        »
        »
        »
        7 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I am sorry you thought so. I did not know. There is no need to be nasty. If you still have any ideas regarding the above kindly share. Thank you :)