MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / cmp

Class cmp

code/graph/dijkstra.cpp:2–5  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1int *dist, *dad;
2struct cmp {
3 bool operator()(int a, int b) const {
4 return dist[a] != dist[b] ? dist[a] < dist[b] : a < b; }
5};
6pair<int*, int*> dijkstra(int n, int s, vii *adj) {
7 dist = new int[n];
8 dad = new int[n];

Callers 1

cdivFunction · 0.50

Calls

no outgoing calls

Tested by 1

cdivFunction · 0.40