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

Автор ___---___, история, 9 лет назад, По-английски

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

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

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +6 Проголосовать: не нравится

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?