Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hack of Connected Components of Complement Graph #1276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OmeletWithoutEgg
Copy link

the wrong solution, also see random_kruskal.cpp.

This solution randomly selects a pair of point as an edge, and merge them if the edge is in the complement graph. Repeat this process for 10^7 times, you can pass all the previous testcases.

I added a testcase that there is an edge you must merge, and the probability of choosing it is about 1/N^2, so that this solution will fail with quite high probability.

ref: https://judge.yosupo.jp/hack/154

@maspypy
Copy link
Collaborator

maspypy commented Nov 14, 2024

Thank you very much.

It seems that there's an error in sol/random_kruskal.cpp. Additionally, on Library Checker, there are environment-dependent issues, so we generally avoid using random uniform_int_distribution. Therefore, I apologize, but I plan to merge after deleting the sol you created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants