| 139 | } |
| 140 | |
| 141 | void test_9() { |
| 142 | vvi adj(2); |
| 143 | |
| 144 | for (int i = 0; i < 100; i++) |
| 145 | { |
| 146 | adj[0].push_back(0); |
| 147 | adj[1].push_back(1); |
| 148 | } |
| 149 | |
| 150 | adj[0].push_back(1); |
| 151 | adj[1].push_back(0); |
| 152 | |
| 153 | pair<union_find, vi> res = scc(adj); |
| 154 | union_find scc = res.first; |
| 155 | |
| 156 | assert_equal(scc.find(0), scc.find(1)); |
| 157 | } |
| 158 | |
| 159 | void test_10() { |
| 160 | vvi adj(4); |
no test coverage detected