You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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$
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.
The text was updated successfully, but these errors were encountered: