We will hold AtCoder Beginner Contest 401.
- Contest URL: https://atcoder.jp/contests/abc401
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250412T2100&p1=248
- Duration: 100 minutes
- Writer: nok0, MMNMM, evima
- Tester: physics0523, kyopro_friends
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-500-575
We are looking forward to your participation!









The first Unrated ABC for me!
Today I'll start from G :)
UPD: G taught me a lesson: relative error is not the same as absolute error :(
I know this is very unpolite, but I really want to ask: Are you a transfiguration girl?
You have made a typo: unpolite -> impolite
no you just understand too much
Hope the 575 is the real 575.
It is the real 575, but I have a difficult way to solve it, maximum flow.
kenkoooo's submission page was back!!! YESSS!!!
I can't understand this(at 20:03):
What's your timezone? In JST the contest truly starts at 21:00.
I don't believe you're true North Korean. (In your profile you set your country to be North Korea)
Was problem D pulled from the concentration camps in North Korea? Because it is pure torture.
how ? if you understood the problem well , implementation was straightforward
No, I got WA*5 then skipped the problem, and passed in the 6th attempt after solved F
**Hope my performance will be higher than ABC400.
The problem D is very interesting . Thank you , the question setter !
I'm a strange man that can see only the first AC time of each problem.
I'm curious, is D the hardest problem in this contest?
I guess it's like this.
lol
i solved it with a bit struggle
so i think E was harder for me
D need the longest code so it is the last to be solved.
G can use Atcoder Library. And maybe most people like to solve problem from A to G or from G to A.
The contest is not good!A,B,C is very esay,but D……
Nice problems. Solved 5 without any penalties :)
Hi everyone!
I didn't manage to solve problem E within the contest duration
Can someone explain me the idea of it?
To solve the problem for $$$1,2,3,\dots,k$$$, you need to solve the two subproblems:
thanks very much sir!
So much cheating via generative AI ;(
I use FFT to solve $$$\sum\max(A+B,d)$$$ in F and totally forget what two pointers are.
I did the same, we are suffering from success!
Noob me, wrote formula for C :)
Ouch! I has found the correct way to slove D for about $$$20$$$ minutes, but I have not made it till now.
Thanks for the Big sample 4 in E, it really matters
It seems I'm just too bad at this.
For those who solved Part — D , Can you say, whether have I used the right approach, and say why my code fails around 20 testcases
This is My code :
try this data:
7 2 .o???o.
.o.o.o. is what you should output
But in the it is given exactly K o's then how it can be 3 o's in the output
sry for that. try 9 4 .o?????o.
.o.o.o.o.
9 4 .o?????o.
.o.o.o.o.
why this submission for C is wrong ? It's the same ediotrial soltuion typically The Submission
Maybe you can solve it like this.
Somtimes total gets negative value due to subtraction. One way to avoid this is check if total < 0, if it is, add MOD to total.
Please define the relative error in future problems requiring floating-point arithmetic, like codeforces does. I didn't submit a correct solution only because its error appeared to be too big.
G's Time Limit is so tight, and if I
memsetsome__int128array, I'll get TLE while I can AC if I don't use__int128at some arrays. Very sad and can't enjoy :(Crying, sobbing.
Maybe because I'm to lazy...
I think there is no need to use __int128? everything works well under double.
My solution that should perform about 3e9 long double operations passed comfortably, idk what you're using int128 for
why was D so hard
Why?? We only need to handle some cases.64765782
D was the hardest problem. E, F and G are pretty easy :/
Agreed. I passed all problem except D.
Please give some hints for E.
For each i, find the smallest number in the path from 1 to i.
Calculate the answer from smaller to larger while removing adjacent greater vertices.
64779931
Why is it that when I test the sample of G question, the 1e-2 level is different, but the submission is also ac