forked from yosupo06/library-checker-problems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request yosupo06#1276 from OmeletWithoutEgg/master
Add hack of Connected Components of Complement Graph
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
graph/connected_components_of_complement_graph/gen/star_remove_one_edge.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters