We will hold Panasonic Programming Contest 2025(AtCoder Beginner Contest 406).
- Contest URL: https://atcoder.jp/contests/abc406
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250517T2100&p1=248
- Duration: 100 minutes
- Writer: math957963, cn449, sounansya, maspy
- Tester: MtSaka, toam
- Rated range: ~ 1999
- The point values: 100-200-350-400-450-500-625
We are looking forward to your participation!








website not loading. 500 Internal Server Error
Why is there a 500 Internal Server Error?
Problem D is repeated. If I'm not mistaken then I solved the same problem with a different statement or a problem with the same logic in a recent ABC.
The problem
I thought a persistent version of F could be an interesting problem.
In my opinion: G>C>E>D>F>B>A
no,G>E>C>F>D>B>A (but i think that C is about the same difficulty as F in general)
promble C should not be promble C
I found Problem F to be quite similar to Problem D of Recent LeetCode Biweekly Contest 154.
Similar logic can be applied though; I ran out of time to solve it..
Actually, F is a classical ds problem.
The quality of problem E is very high. Problem F is too formulaic and can be solved with a simple tree decomposition, or even without it, just using DFS order + Fenwick tree.
I think I'm the only one who is so dumb as to use tree decomposition to solve F
F is much easier than E for me.
It took me a long time to solve problem E, so I didn't have time to solve problem F
I got 6 WA on B idk where I went wrong
can someone tell me their approach?
did you check for overflow ?
i checked for overflow as well but the editorial also said that the overflow would be so quiet often that you cant always have a track of it.
They used a really clever technique to see whether the multiplication exceeds k digits
Anyway appreciated for the reply
For E , I used bit dp to get count & sum of numbers and I am getting WA . Can someone provide me relevant test case where my Code fails.
exact same failure pattern for me too.. using digit dp ... :(
can you explain the code for digit dp?
I am not very good at digit dp .. so didn't do it during contest but I can give high level idea and also I can't explain it very well .. here is my submission
https://atcoder.jp/contests/abc406/submissions/65933199
first I counted how many numbers with K bits are possible which happens in
recurCnt.. the idea is to keep track of how many 1s I have used usingcntparameter ...powerparameter is I think not used in this functionthen I counted
recurSumto count the final answer... it usesrecurCntresult but using a dp tableone thing which changes in
recurSumis if I have a1somewhere .. it have a value ofpowerin its current position .. so how many times this1will contribute to the final answer is the value of this1which ispowermultiplied bycount of smaller numbers ( in terms of length ) with remaining occurrence of 1sI debugged my code .. but didn't look at yours
I was calculating two DPs .. count DP and sum DP ... both were 64-bit integers ... I was multiplying 64-bit
count DPwith some big number in my code which was overflowing.I handled modulo for
sum DPbut had to do it forcount DPas well kind ofhelp me find the bug of my code in Problem C : AC x33, WA x5
Click this link to check my code
use long long?
The DEF problem in this contest has the same problem in other OJs
Well, problem C is really harder than D and E.
Why I got WA and TLE on G here?
I learned how to do this problem here and I used slope trick and
std::map.I hope AtCoder can allow users download test cases again. This is useful for participants and I don't know why AtCoder stop public test cases.