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

Contact Form Submission - Mistake (Advanced - Sum over Subsets DP) #4994

Open
maggieliu05 opened this issue Dec 18, 2024 · 4 comments · May be fixed by #5076
Open

Contact Form Submission - Mistake (Advanced - Sum over Subsets DP) #4994

maggieliu05 opened this issue Dec 18, 2024 · 4 comments · May be fixed by #5076
Labels
content content-related issue good first issue Good for newcomers

Comments

@maggieliu05
Copy link
Contributor

Someone submitted the contact form!

URL: https://usaco.guide/adv/dp-sos?lang=cpp
Module: Advanced - Sum over Subsets DP
Topic: Mistake
Message:
There is a mistake in the https://usaco.guide/adv/dp-sos section in the optimized sum of subsets dp code. Before, I found a mistake in the 3^n solution where it would infinite loop. That is fixed now but in the 2^n solution the code accesses indicies -1 in c++. Running the code makes a segfault. I think if you re-index the vector to start from -1 it should work.

@maggieliu05 maggieliu05 added content content-related issue good first issue Good for newcomers labels Dec 18, 2024
@bqi343
Copy link
Member

bqi343 commented Dec 18, 2024

Also, the module should really include an implementation that performs the sos operation in-place rather than initializing a new 2D array of size $2^N \cdot N$

@bqi343
Copy link
Member

bqi343 commented Dec 18, 2024

Also, this should be in the Platinum section considering there are multiple USACO Platinum problems in this module.

@SansPapyrus683
Copy link
Contributor

How did this line pass review?

that's a great question

@Sosuke23 Sosuke23 linked a pull request Jan 23, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content content-related issue good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants