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

Function test_3

code/graph/scc.test.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void test_3() {
34 vvi adj(5);
35
36 adj[0].push_back(1);
37 adj[1].push_back(2);
38 adj[2].push_back(3);
39 adj[3].push_back(4);
40 adj[4].push_back(0);
41
42 pair<union_find, vi> res = scc(adj);
43 union_find scc = res.first;
44
45 assert_equal(scc.find(0), scc.find(1));
46 assert_equal(scc.find(2), scc.find(1));
47 assert_equal(scc.find(2), scc.find(3));
48 assert_equal(scc.find(4), scc.find(3));
49}
50
51void test_4() {
52 vvi adj(5);

Callers 1

testFunction · 0.85

Calls 4

sccFunction · 0.85
push_backMethod · 0.80
assert_equalFunction · 0.50
findMethod · 0.45

Tested by

no test coverage detected