Update mincost-dijkstra.cpp

add if for mincost (not max flow)