test/cpv_local/graph/chordal.bzoj1006.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: LOCALCASE test/cpv_local/_data/bzoj/1006 | ||
| 2 | |||
| 3 | #include "../../../src/fast/rsort32/lib.hpp" | ||
| 4 | #include "../../../src/graph/chordal/lib.hpp" | ||
| 5 | #include "../../../src/graph/ds/alist/lib.hpp" | ||
| 6 | |||
| 7 | using namespace tifa_libs; | ||
| 8 | using std::cin, std::cout; | ||
| 9 | |||
| 10 | 10 | int main() { | |
| 11 | u32 n, m; | ||
| 12 |
2/4✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 10 times.
✗ Branch 5 not taken.
|
10 | cin >> n >> m; |
| 13 | 10 | alist g(n); | |
| 14 |
2/2✓ Branch 0 taken 1526018 times.
✓ Branch 1 taken 10 times.
|
1526028 | for (u32 i = 0, u, v; i < m; ++i) { |
| 15 |
2/4✓ Branch 1 taken 1526018 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1526018 times.
✗ Branch 5 not taken.
|
1526018 | cin >> u >> v; |
| 16 | 1526018 | --u; | |
| 17 | 1526018 | --v; | |
| 18 | 1526018 | g.add_arc(u, v); | |
| 19 | 1526018 | g.add_arc(v, u); | |
| 20 | } | ||
| 21 |
2/2✓ Branch 2 taken 23560 times.
✓ Branch 3 taken 10 times.
|
23570 | flt_ (u32, i, 0, n) ::sort(g[i]); |
| 22 | 10 | chordal chd(g); | |
| 23 |
2/4✓ Branch 2 taken 10 times.
✗ Branch 3 not taken.
✓ Branch 5 taken 10 times.
✗ Branch 6 not taken.
|
10 | cout << chd.chromatic_number() << '\n'; |
| 24 | 10 | } | |
| 25 |