code
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
const int V = 10;
double distTo[V]; // distTo[v] = shortest path of s->v
struct LessThanByDist
{
bool operator()(const int i, const int j) const
{
return distTo[i] < distTo[j];
}
};
struct GreaterThanByDist
{
bool operator()(const int i, const int j) const
{
return distTo[i] > distTo[j];
}