We will hold Next DP Contest on AtCoder.
- Contest URL: https://atcoder.jp/contests/ndpc
- Start Time: https://www.timeanddate.com/worldclock/fixedtime.html?iso=20260505T1300&p1=248
- Duration: 300 minutes
- Number of Problems: 20 problems
This contest is a collection of practice problems on dynamic programming (DP). DP is one of the most important algorithms in competitive programming because of its high versatility and wide variety of applications. Therefore, studying DP is essential for gaining a deeper understanding of competitive programming. In the past, contests such as TDPC(Japanese language only) and EDPC were held for the purpose of practicing DP.
On the other hand, as time goes by, techniques become more diverse and more widely used. Now, 12 years after TDPC and 7 years after EDPC, DP techniques that did not appear in those contests have started to show up in contests, especially in ABC and ARC. This contest focuses mainly on techniques that were not covered in TDPC or EDPC. We hope you will use it both to test your skills during the contest and to review afterward.
We are looking forward to your participation!








we got atcoder dp contest#2 before gta6
I am sure we would get atcoder DP contest #3 before GTA6 as well.
:)
They say that the average person can only get 20 points
real great contest
When can we expect the editorial?
If you check the box of "Show editorial in other language", there is an editorial ( テーマ一覧(ネタバレ注意)) with hint that the technique are used for each problems
They said, if you are good at DP: 70 points. I found that Potato167 is barely good at DP, with 73 points.
So can we got atcoder dp contest#2's editorial before gta6?
This solution for problem S — Two doors passes the tests. Could someone help me understand whether it is actually correct?
Similar to the editorial, we observe that we need to cut $$$(1, 1)$$$ from $$$(n, n)$$$ with a simple path along door and wall grid edges that passes from the upper-right border through A and B to the lower-left border. Further, its three segments -- UR $$$\rightarrow$$$ X0, X1 $$$\rightarrow$$$ Y0, Y1 $$$\rightarrow$$$ LL -- should not be connected by wall grid edges. So, we can merge grid corner vertices into connected components. Minimizing the number of doors along the path while ensuring that each component is used in at most one segment gives the correct answer.
The basic idea of a randomized solution is that we can randomly colour vertices with three colours, and then search for the shortest segments only visiting vertices of the correct colour. An improvement to this is to search for the segments sequentially. For the first segment, we can use a random bi-colouring, defining currently allowed and currently forbidden vertices. For the second, ensure that the already visited vertices are not reused, and for the others generate a new bi-colouring. For the third segment, every remaining vertex is allowed. If the third segment is the longest in the correct answer, we avoid many of the constraints and only need each of the first two segments to be coloured as allowed on their turns, and additionally to colour a few other vertices as forbidden to make every bad choice of a segment either blocked or too costly.
However, this could only work if the answer had a small cost, for example if each edge was either a door or a wall, and even then it would require carefully tuning or randomly sampling probabilities of "allowed" and "forbidden" colours. Instead of using two discrete colours we can assign a random priority to each vertex, representing its degree of forbidden-ness, and when searching for a segment of the path first minimize the maximum used priority, then minimize the path length. If we needed to colour some vertices allowed and some forbidden, now we only need the former to have lower priorities than the latter. This achieves the effect of choosing the optimal colour probabilities and should slightly improve the probability of success. While there is a chance that a longer path might be preferred because it has a smaller maximum priority, this is not overly likely since that path has to bypass a specific maximum-priority vertex and, being longer, not encounter an even worse vertex.
The final solution is:
reusing but not inverting seems not to[UPD: there was a bug, reusing but not inverting also works]).Does it really have a good worst-case success probability, or is there a counter-test?