#include#include #include using namespace std;#define mx 505struct edge{ int c; int len;};vector E[mx];int city[mx];int dis[mx];int visited[mx];int ccnt[mx];//the number of different shortest pathint csave[mx];int main(){ int n,m,c1,c2; scanf("%d %d %d %d",&n,&m,&c1,&c2); for(int i=0;i dis[nowP]+d) { dis[tmpc]=dis[nowP]+d; csave[tmpc]=city[tmpc]+csave[nowP]; ccnt[tmpc]=ccnt[nowP]; }else if(dis[tmpc]==dis[nowP]+d) { ccnt[tmpc]+=ccnt[nowP]; if(csave[tmpc]