We will hold AtCoder Beginner Contest 426.
- Contest URL: https://atcoder.jp/contests/abc426
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20251004T2100&p1=248
- Duration: 100 minutes
- Writer: physics0523, yuto1115, evima
- Tester: sheyasutaka, math957963
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-525-575
Starting with this contest, the rules against generative AI have undergone significant changes. Please make sure to review this post and the rules.
We are looking forward to your participation!








Now we have significant changes for the rule against generative AI. Not only ABC, but ARC and AGC are also affected. I suggest reading the new rules for all AtCoder contestants.
if u use ai in abc, it's useless to improve ur coding ability except for a high rating(but its useless
This will be my first contest on the AtCoder.
G is a totally shit. It's the same as this one: https://www.luogu.com.cn/problem/P6240
ABC now becomes a contest that copy other Online Judges' problems, and that is really bad for those who try to solve problems properly.
Also, ABC doesn't ban people who use AI, and that's bad either.
I love Atluogu.jp !!!
Problem D is great, but EFG are shitty.
E: Totally math problem;
F: Segbeats template;
G: Cattree Divide and Conquer template.
i did F without segbeats
In fact you can pass it with segbeats template within 10min.
You can pass without segbeats template within 10 minutes
Can you share your submission for problem F?
Submission link
Why there's so many problems that be solved with Segment Tree?!
Because it's a great Data Structure. Also, if you are talking about C, it can also be solved with Fenwick Tree.
Edit: It can also be solved using just a loop and tracking the latest OS version. Just realized it.
But C can be also solved with brute force.
This is my code, it's easy to understand. Though variable $$$L$$$ do not decrease, the time complexity could be $$$O(N+Q)$$$.
Yes, just realized it.
How to solve E?
Did I need to use calculus in E?
Nope. You only need to calculate a local minimum of a quadratic function. It can be easily done without involving derivative.
Minimum distance from a point to a segment is enough, though I did with ternary search and got 2 flags :skull:
Extremely disgusting E. E can be easily solved by chatGPT in just a few seconds, but human being will get stuck and keep getting wrong answer. This will give cheaters great advantage. They can even have time removing comments and modify the code to make it appear less AI generated looking.
Master like me has already fall below 1600, guess I will eventually reach 1200, and will become Master in codeforces and Pupil in atcoder simultaneously if the problem quality is keep as low as this.
Is G too classic?I think too many people had tried it before the contest began.
yeah its a well-known trick called "cat-tree divide", and it is almost the same as Luogu P6240
Another "well-known trick in China",haha
How do you guys know about these tricks?
See those in some other problems
What is "cat-tree divide" ? Where can I read about it and find similar problems ?
u can https://immortalco.blog.uoj.ac/blog/2102 to read about it (but it is written in Chinese), some other problems are SPOJ GSS1/SPOJ GSS5, Luogu P7482
Thanks!
I tried ternary search on problem E, but got WA. Is there some corner case for which ternary search would not work?
Did you use ternary search?
in Ternary search?
Not sure what it means, what is three-pointer in ternary search?
He is a student and he hasn't learned English well.
The function of the distance is conbination of two parts,which means you have to divide the function into two parts and use "ternary search" in each part.
The distance between Takahashi and Aoki (as a function of time) is
convexunimodal when both of them is moving OR one has stopped, but not when you put the cases TOGETHER.So you need to do ternary search separately for both of the cases.
Edit: it's not "convex", should be "unimodal".
Oh you're right, I didn't realize that.
Let DT and DA be the amount of time Takahashi and Aoki take to reach their destinations. Let's do a ternary search on [0..min(DT,DA)] (both moving) and another ternary search on [min(DT,DA)..max(DT,DA)] (one stopped, other still moving).
Got AC doing that.
Thank you very much!
ternary search separately.Thanks for this.
I know now why you and me got it wrong, the reason is we forgot to case work in two part 1)where both walker not stop moving yet and 2)the case where one walker stop moving while the other walker can still move, an attempt to solve it without case working it this way will gives wrong answer cuz the function will not be truly unimodal and our implementation fail to realize this case, at least that was the case for me, this is truly an amazing feeling, never before I want to K*ll my self before go to bed but at least I learn new thing today man 😭
Please use yuantiji.ac before publishing contests...
wtf is this??????????
Peak obfuscation.
Anti-Anti-AI
S**t F,G.
Please do not give geometry problems that involve only simple math anymore.
Hi solved problem D in todays Contest using 2p + dq. Let me know if you guys are interested in a video explanation
I would like to know your thought process and how you solved this!!! Can you give me atleast a written explanation?
What is the problem with my solution for problem E.
https://ideone.com/auf8wW
I am Carbon Twelve!
g is p6240 in luogu, so I got the first accepted in g and f is a segbeats template, but remember to use int128.
Storing the count of valid non-zero elements in intervals, rather than the sum of the number of intervals, will not cause a long long overflow.
In the solution to Problem E, "$$$\frac{t}{q}\vec{AB}$$$" should be "$$$\frac{t}{p}\vec{AB}$$$".Because it is $$$\frac{\vec{AB}}{p}$$$ that is the unit vector.
Why to use ternary search in E?
My approach is to directly solve for the minimum of a quadratic function (treating $$$|\vec{OF}+t\vec{FG}|$$$ as squared and t as the unknown), and the reason for using ternary search is probably also because this function is unimodal.
Or according to the code, $$$\vec{AB}$$$ in the formula should be $$$\vec{AE}$$$.