This is my approach, I can't understand why I am getting WA.
#include<iostream>
#include<utility>
#include<cstdio>
#include<vector>
#include<string>
#include<map>
#include<queue>
#define MAX_INT 1077952576
using namespace std;
int E,len;
int cost[2*2000+10],res;
bool visited[2*2000+10];
map ...