#include using namespace std; #define int long long signed main(){ int H,W; cin>>H>>W; H -= 2; vector> A(H,vector(W)); for(int i=0;i>A[i][j]; if(A[i][j] == -1) A[i][j] = 1e18; } vector> dp(H,vector(W,1e18)); for(int i=0;i