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!









Since GPT-5 solved all the problems in the ICPC World Final, it seems that many competitive programming training platforms have started banning the use of AI.
Still, I hope I can achieve good results in upcoming contests — and wish everyone the best of luck in reaching their own goals too
While it's impossible to ban all AI users, I believe the competitive environment on AtCoder would be more ideal if everyone could refrain from using AI.
I’m not as fast at coding as those real experts, but one of my friends once told me during an ABC contest that AtCoder allowed the use of Copilot as a coding assistant.If I remember correctly, the previous anti-AI policy still allowed using Copilot to assist with coding and speed things up, but now it’s completely banned.
I never really used Copilot for contests anyway — its auto-completion feels kind of “dumb” and often has no idea what I actually want to write.
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
qp
You can tell right away they're Chinese, and me too(
我是中国人。I'm a Chinese.
Kind of controversial but about time atcoder banned people from using ai for stuff like language conversion. However its kind of sad that now theres gonna be less brainfck submissions.
I don't think the AI can solve the problems correctly,as they are not as clever as people in some ways.
Of course, I refer to solving the problems at the back like F or G. A and B are too easy.
Yes Just because the AI,make my standing lower
This will be my first contest on the AtCoder.
If I can't solve Problem D,can I give up programming?
Just a joke.
Task G is ... GGF's contest's orignal Problem OMGGGGG but i haven't attend.
writers need to do self-check
你改悔吧
Problem $$$D$$$ is constructive cancer.
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.
The necessary and sufficient condition for achieving outstanding results in ABC is having a good original problem generator, instead of one's own ability.
I dont know the error of my solution for D task.
Does anyone knows ?
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.
Yeah i thought it can be solved using segment tree but just saw the editorial
I also think it's a good data structure, but I don't think it's a good idea to make two or even three templated Segement Tree Problems. I think it's better to let it flexible.
For C, i'm not strong enough to discover it, so I choose to use Segement Tree. My friends are also like me.
can you share your segment tree thought , how do you solve it ?
Of course.
We need the interval modify and query operate.
For every query, we get the number of OS version that between 1 and x. It's the answer of this query. Then we modify the number of OS version that between 1 and x to 0. And add the number to the number of OS version y.
thanks
How to solve E?
Did I need to use calculus in E?
I think it's no need to use calculus, we can calculate it by using quadratic Function.
Also, I don't like this problem very much. I think it's a mathematics problem of junior high school instead of a problems in the algorithm competitions.
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:
can somebody help me with c
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.
Yeah same I only pass the sample 😭
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...
"Closest Moment" is another masterpiece after "RLE Moving"
wtf is this??????????
Peak obfuscation.
Anti-Anti-AI
ai cheaters exposing themselves
I solved E one minute after the game.Your text to link here...
hp, and this is my first ABC Contest, it is my first discuss in Codeforces too. Good Lucky for me!
S**t F,G.
Shoutout to everyone who solved G by refering the solution of luogu P6240! It really paid off in this contest.
pooper FG
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
wer contest? why time wrong? I missed it :<
Video Solution of A,B,C,D,E with C++ code of AtCoder Beginner Contest 426: https://youtu.be/Um86KcUtbu0
Before holding this contest,I sunggest problemsetters to use this to check if their problems are new?(I'm sorry for my poor English)
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}$$$.