DIJKSTRA IN 2 D MATRIX USING PRIORITY QUEUE :) SPOJ SHOPPING #include<bits/stdc++.h> #define f first #define s second using namespace std; int indx[]={-1,0,0,+1}; int indy[]={0,+1,-1,0}; int w,h; string a[1000]; #define pp pair<int,pair<int,int> > class Prioritize { public: int operator() ( const pair<int,pair<int,int> >& p1, const pair<int,pair<int,int> >& p2 ) { return p1.first > p2.first; } }; void dij(int x,int y,int x1,int y1) { //cout<<"gaya"<<endl; int visited[h][w]; int i,j,dt1,dt2,dt3; for(i=0;i<h;i++) for(j=0;j<w;j++) visited[i][j]=0; int dist[h][w]; for(i=0;i<h;i++) for(j=0;j<w;j++) dist[i][j]=INT_MAX; visited[x][y]=1; dist[x][y]=0; priority_q...