Skip to content

Commit

Permalink
Merge pull request yosupo06#1276 from OmeletWithoutEgg/master
Browse files Browse the repository at this point in the history
Add hack of Connected Components of Complement Graph
  • Loading branch information
maspypy authored Jan 27, 2025
2 parents 245f865 + 914b2ab commit 3d78473
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#include <cstdio>
#include "random.h"
#include "../params.h"

using namespace std;

int main(int, char **argv) {
long long seed = atoll(argv[1]);
Random gen(seed);
int n = N_MAX;
int m = n - 2;
printf("%d %d\n", n, m);
auto [center, partner] = gen.uniform_pair(0, n - 1);
for (int i = 0; i < n; ++i) {
if (i != center && i != partner) {
printf("%d %d\n", i, center);
}
}
return 0;
}
4 changes: 3 additions & 1 deletion graph/connected_components_of_complement_graph/hash.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,7 @@
"no_edge_00.in": "5fc37b8e820c7ecfdaf122cdc5a0e1e9174d5d09d0b9c7aae8aeac434ca26aed",
"no_edge_00.out": "219da5b597741168f705e7eeec1102c50593f23ec03d47fbd8d38d5f54c8b811",
"star_00.in": "81ee21ae7add6b764b36888d0c9703ab616e634c17260735cf1087f5dd14a962",
"star_00.out": "d77af3500c0728e06c0b134a8f2c92ad1c3cc62b97f2f2c44d3b4f1016e6a76a"
"star_00.out": "d77af3500c0728e06c0b134a8f2c92ad1c3cc62b97f2f2c44d3b4f1016e6a76a",
"star_remove_one_edge_00.in": "bb01449453c118387af9525dcb8ffcefefd3eec0c569c521c854f1556e5bd15b",
"star_remove_one_edge_00.out": "219da5b597741168f705e7eeec1102c50593f23ec03d47fbd8d38d5f54c8b811"
}
3 changes: 3 additions & 0 deletions graph/connected_components_of_complement_graph/info.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ forum = "https://github.com/yosupo06/library-checker-problems/issues/865"
[[tests]]
name = "star.cpp"
number = 1
[[tests]]
name = "star_remove_one_edge.cpp"
number = 1
[[tests]]
name = "complement_of_sparse.cpp"
number = 5
Expand Down

0 comments on commit 3d78473

Please sign in to comment.