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

Function test_4

code/graph/scc.test.cpp:51–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void test_4() {
52 vvi adj(5);
53
54 adj[0].push_back(1);
55 adj[1].push_back(2);
56 adj[2].push_back(3);
57 adj[3].push_back(4);
58
59 pair<union_find, vi> res = scc(adj);
60 union_find scc = res.first;
61
62 assert_not_equal(scc.find(0), scc.find(1));
63 assert_not_equal(scc.find(0), scc.find(2));
64 assert_not_equal(scc.find(0), scc.find(3));
65 assert_not_equal(scc.find(0), scc.find(4));
66 assert_not_equal(scc.find(1), scc.find(2));
67 assert_not_equal(scc.find(1), scc.find(3));
68 assert_not_equal(scc.find(1), scc.find(4));
69 assert_not_equal(scc.find(2), scc.find(3));
70 assert_not_equal(scc.find(2), scc.find(4));
71 assert_not_equal(scc.find(3), scc.find(4));
72}
73
74void test_5() {
75 vvi adj(5);

Callers 1

testFunction · 0.85

Calls 4

sccFunction · 0.85
assert_not_equalFunction · 0.85
push_backMethod · 0.80
findMethod · 0.45

Tested by

no test coverage detected