test/cpv/library-checker-graph/enumerate_cliques.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | // competitive-verifier: PROBLEM https://judge.yosupo.jp/problem/enumerate_cliques/ | ||
| 2 | #include "../../../src/graph/clique/all/lib.hpp" | ||
| 3 | |||
| 4 | using namespace tifa_libs; | ||
| 5 | CEXP u32 N = 128; | ||
| 6 | CEXP u32 MOD = 998244353; | ||
| 7 | using B = std::bitset<N>; | ||
| 8 | |||
| 9 | 23 | int main() { | |
| 10 |
1/2✓ Branch 2 taken 23 times.
✗ Branch 3 not taken.
|
23 | std::cin.tie(nullptr)->std::ios::sync_with_stdio(false); |
| 11 | u32 n, m; | ||
| 12 |
2/4✓ Branch 1 taken 23 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 23 times.
✗ Branch 5 not taken.
|
23 | std::cin >> n >> m; |
| 13 |
1/2✓ Branch 1 taken 23 times.
✗ Branch 2 not taken.
|
23 | vecuu v(n); |
| 14 |
3/4✓ Branch 4 taken 842 times.
✗ Branch 5 not taken.
✓ Branch 8 taken 842 times.
✓ Branch 9 taken 23 times.
|
865 | for (auto& i : v) std::cin >> i; |
| 15 | 23 | arr<B, N> adj; | |
| 16 |
2/2✓ Branch 0 taken 1140 times.
✓ Branch 1 taken 23 times.
|
1163 | for (u32 i = 0, u, v; i < m; ++i) { |
| 17 |
2/4✓ Branch 1 taken 1140 times.
✗ Branch 2 not taken.
✓ Branch 4 taken 1140 times.
✗ Branch 5 not taken.
|
1140 | std::cin >> u >> v; |
| 18 | 1140 | adj[u][v] = adj[v][u] = 1; | |
| 19 | } | ||
| 20 | 93197 | std::cout << (clique_calc(n, adj, [](u64 x, u64 y) { return x + y; }, [&](u64 x, u32 i) { return x * v[i] % MOD; }, 0_u64, 1_u64) + (MOD - 1)) % MOD << '\n'; | |
| 21 | 23 | return 0; | |
| 22 | 23 | } | |
| 23 |