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

Function pars

code/graph/tarjan_olca.test.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27int* pars(int n, vi *adj) {
28 int *res = new int[n];
29 memset(res, -1, n << 2);
30 for (int i = 0; i < n; i++) {
31 for (int j = 0; j < size(adj[i]); j++) {
32 res[adj[i][j]] = i;
33 }
34 }
35 return res;
36}
37
38pair<vi*, int> random_tree(int n) {
39 vi *adj = new vi[n];

Callers 1

testFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected