We will hold AtCoder Beginner Contest 421.
- Contest URL: https://atcoder.jp/contests/abc421
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250830T2100&p1=248
- Duration: 100 minutes
- Writer: kyopro_friends, yuto1115, sheyasutaka
- Tester: math957963, cn449
- Rated range: ~ 1999
- The point values: 100-200-350-425-475-525-600
We are looking forward to your participation!









QP.
Good Luck to everyone.
let's go!
good luck to everyone giving it
Orz
On the last conteset, I only have 300 scores. I'm very mad.
Thanks to Atcoder that it is SOOO consistent, in contrast to codeforces unfortunatly... :(
Good luck to everyone!
Good luck guys
Hope AC E vOvOv
Me too. Also hope AC D. GL & HF !
yay i hope i do atleast 2 questions today :) goodluck
Hope everyone can get good score
Good Luck!
Hope to AK!
qpzc
oh, I can't access atcoder.(sad I got only 300points qwq.
+1
awa
+1
+1
did you use any kind of AI to write your code?
SUPER RUBBISH ROUND.
Why are you saying so ?. I felt tough and I was able to solve 3 and got stuck coding if else statements and crossing logics for problem D. Many people solved problem F in lesser time.
DEF are the problems that you don't need to think anything and just code. AREN'T these problems rubbish ???
F was very easier compared to D. You just have to use linked list in F and no complex logic or anything.
Well,only I used Splay tree to solve Problem F?
OMG! , simpler brute force works for query of type 2.
A fragment from Editorial.
Although this procedure require the time proportional to the number of deleted elements, since an insertion occurs at most Q times, the total number of deleted elements is also bounded by Q.
You're right, but how can I recognize this simple problem after failing to solve CDE? :(
Fucking problem D!!!
Too much time + multiple wrong attempts = fucked up!!!
So as problem E
why is it so hard???
i got 1575 last round and 300 this round...
What are these numbers about?
Me too... I thought it was so easy but only got AC on ABC. Last time I got AC on ABCD.
I think B needs to be solved using a string. Don't be discouraged, maybe this competition is just a fluke. Next time you participate in ABC, you will find... The problems in ABC are a shit.
Well... perhaps he's meaning he only got ACcepted on problem A & B & C this time, instead of only worked out A and C and didn't figure out B in the Atcoder Beginner Contest (ABC).
DOWNVOTE!SUPER RUBBISH ROUND.(
Worst ABC I have seen.
Sorry, but D was one of the most annoying, tedious case work problem I've ever encountered on AtCoder. I genuinely hated this round.
People who have done with relative concept has neat code. Implementation sucks!
That is true. I envy those who are able to write short code for long implementation problems.
Anybody else use PBDS to solve C ?
very bad round
i think so
this was the first time i ever gave a contest, i could only do A and B, that is all, I got fileted by question C, Its over, life is not worth living
how to solve C
try to keep any letter 'A' or 'B' in even and odd positions and find the distance between the current and actual position and add it to res. Return which arrangement return min cost.
AABBBABABABAhere the cost is2+1=3ABABABhere the cost is1+1=2Is there any optimal approach other than LinkedList for question F.Erase between X and Y
Treap
First time hearing about this
Yes I used Treap (Thanks to CP Algorithms)..
can you explain? please.
only using list is ok.
Like bruteforce or what? what we store in the list, just elements or any other extra information
i doubt you can do range sum query with only using list
You erase everything afterwards anyways, so it amortizes
damn it makes sense yes
why is f easier than d and e
but there are not enough time for me to solve,most of time wasting in problem D
F easy cause setter ran out of evil.
great round
what are you saying,are you the author ?
there always haters after every round, but this round still was beautiful
Do you like this rubbish D?
problems were a mess—either too boring or way too complicated. The difficulty doesn’t make sense, and some problems seem designed just to waste time
Agree
F<<<<<D
upd: i can somehow understand that D is much easier than E in thinking of their solutions, but how the hell is a linkedlist F? in terms of thinking F≈D and in terms of coding F<<<<<<<<<D
RUBBISH ROUND. 300 ppl E 600 ppl F 130 ppl G
Wasted so much time on E(still don't know how to solve it) makes me have no time to solve G.
trash D, G is great.
Huh, G is just a super easy network flow problem.
我过了ABCDEF,G来不及看
it's not wise to use Chinese in CF
%%%%%%
You shouldn't use Chinese on Codeforces! You will perhaps be downvoted.
Yeah bro you're supposed to use English or Russian.
Worst ABC.
For question D i tried to do some simulation like this can someone tell me why it wont work , i tried merging line with like similar direction updates to make a straight line and check their intersections
rubbish round
D is sh*t!
very bad round,downvote!!!
The worst one I have ever seen.Why are you guys always giving out stupid problems to us?
A shit contest.
hp
F is a lot easier than D and E. D was too impl heavy + boring and hence had no motivation to solve it. Really feeling the quantity over quality...
For F, an offline way to check if X comes before Y: Create the digraph (type 1 x->i) and check toposort order.
D is a bit boring with heavy implementation. I have no motivation to solve the problems :(
D是什么东西 D is 【"Harmonious" words】
The worst ABC I have participated! Downvote it! Make it be the end of CodeForces!
What a rubbish D it is! My ideas even are better than these!
F is much easier than E and D. Swapping E and F makes a lot of sense.
swap(D, F) plz... D is tooooooooo boring.
what a super rubbish round.
awful contest.
Hope can replace D with F.
I am so mad when I have WA*10 in D everytime.
Shit Contest
Atcoder Implementation Contest
Fuck D
D was not too bad, the issue was just time, I just felt this round in general was meant for beginners in programming
Dont spread adult content
史
Wow so respectless. You posted a Chinese means "shit " in English
I have always held the view that a contest with standards strictly inferior to those my classmates and I could randomly organize is not worth wasting 10k users' time for 100 minutes. In this situation, it is permissible to insult the contest.
this contest is meaningless at all
Oh, this contest is the WORST one I've taken part in.
Why is the next ABC on Sunday at 12:10 (Beijing time)
SUPER RUBBISH ROUND
i got 2575 last round and 600 this round...
Yes,F<<D.
Yes, F<<D.
u can see that F and G are both without thinking... it's a good news that i come late so i hadn't ate that shit.
Bullshit contest.
I am new to AtCoder, how much time does it take tentatively for the ratings to update?
by 10:30
No comment. Plz downvote this ??? contest.
Lets make it most downvoted ABC contest
Although I got a good result, I still have to say that this contest was really bad, especially the D problem.
The person who created the question will be criticized as Fwb
It's hard to believe that scores of 650 and 2025 came from the same contestant. I think it was a bad round.
many contestants did the same.(Just like me)
atcoder 正在蒸蒸日上
downvote to this problem. this contest is the same rubbish as abc387
It's a shit. I've never seen such a trashy competition before.
For D, you should get the right idea, then it is not so complex
but it is still hard to finish in 100min (you have to solve other problems)
Problem D is too boring! I hate it!
我们对爱并不陌生 你知道规则,我也知道 我所想的是一个完整的承诺 你不会从其他人那里得到这个的 我只是想告诉你我的感受 必须让你明白 永远不会放弃,永远不会让你失望 永远不会跑来跑去抛弃你 永远不会让你哭泣,永远不会说再见 永远不会说谎伤害你
垃圾ABC412!!!
Edit: previously I put Chinese comment before the English translation, and I'm sorry. Now I deleted Chinese content.
Why don't you think about your own behavior when your account is banned by the anti-cheat system? You escalate it to personal attacks. Do you think you are supreme?
你打过这场比赛吗,就在这bb
不明白事实就在这里瞎BB,你以为你就是你所说的高大上吗?
我看你就是这场比赛的出题人,下雨没打伞————脑子进水。
还账号被反作弊系统封禁,你以为我被封禁了吗,单纯是题目排序太垃圾了。你以为你是神明,上帝,天王老子,玉皇大帝吗?你个小垃圾,废物,乐子,还在这里乱说话。
废物歪果仁。
你以为我是@lichenxi108 吗?这是公愤,所有人的愤怒,只是ta被封号了,不明我被封号了,日本鬼子。
Sorry, now I know that you're Chen Minhe not Li Chenxi, however, Li Chenxi's behavior is not good anyway
怎么,被骂自闭了?呆瓜。
:skull
我常常追忆过去生命瞬间定格在脑海我将背后的时间裁剪折叠蜷曲揉捻成天上朵朵白云云朵之间亦有分别积云厚重而卷云飘渺生命里震撼的场景掠过我的思绪便一生无法忘怀而更为普通平常的记忆在时间的冲刷下只留下些许残骸追忆宛如入梦太过清楚则无法愉悦自己的幻想过分模糊却又坠入虚无只有薄雾间的山水面纱下的女子那恰到好处的朦胧才能满足我对美的苛求追忆总在不经意间将我裹进泛黄的纸页里分别又重聚的朋友推倒又重建的街道种种线索协助着我从一个具体的时刻出发沿时间的河逆流而上曾经的日子无法重来我只不过是一个过客但我仍然渴望在每一次追忆之旅中留下闲暇时间在一个场景前驻足在岁月的朦胧里瞭望过去的自己感受尽可能多的甜蜜美好的时光曾流过我的身体我便心满意足过去已经凝固我带着回忆向前只是时常疏于保管回忆也在改变着各自的形态这给我的追忆旅程带来些许挑战我该在哪里停留我问我自己
前节写“洒江郊” 的茅草无法收回,除此以外,还有落在平地上可以收回的茅草,但却被“南村群童”抱跑了。“欺我老无力”五字宜着眼, 如果诗人不是“老无力”,而是年当壮健有气力, 自然不会受这样的欺侮。“忍能对面为盗贼”,意思是,群童竟然忍心在他 的眼前做盗贼。但其实,这不过是表现了诗人因“老无力” 而受欺侮的愤懑心情而已,决不是真的给“群童”加上“盗贼”的罪 名,要告到官府里去办罪。所以,“唇焦口燥呼不得”,也就无可奈何了。用诗人杜甫的《又呈吴郎》一诗中的话说,这正是 “不为困穷宁有此”,诗人如果不是十分困穷,就不会对大 风刮走茅草那么心急如焚;“群童”如果不是因为他十分困穷,也不 会冒着狂风抱走那些并不值钱的茅草。这一切,都是结尾 的伏线。“安得广厦千万间,大庇天下寒士俱欢颜”的博大胸襟和 崇高愿望,正是从“四海困穷”的现实基础上产生出来的。
Atcoder Beginner Contest is getting better and better(doge
The worst ABC I have ever attended.
I think D was difficult(wording atleast) compared to F. In F you just have to use a linked List nothing else. (T_T)
Spent too much time in problem D and multiple wrong attempts due to silly mistake.(T_T T_T)
long long died in D(AC23,WA1),no time in E,maybe FG<DE???
Yes
ABC will be infamous
import java.util.*;`public class Main {`` public static void main(String[] args) {` ` Scanner sc = new Scanner(System.in);` ` int q = sc.nextInt();` ` int count = 0;` ` LinkedList<Integer> ls = new LinkedList<>();` ` ls.add(0);` ` for(int i=0; i<q;i++){` ` int x = sc.nextInt();` ` if(x == 1){` ` int toAdd = sc.nextInt();` ` int index = ls.indexOf(toAdd);` ` if(index != -1){` ` ls.add(index+1, count++);` ` }` ` }else if(x == 2){` ` int start = sc.nextInt();` ` int end = sc.nextInt();` ` boolean removing = false;` ` Iterator<Integer> it = ls.iterator();` ` int sum = 0;` ` int val =0;` ` while(it.hasNext()) {` ` val = it.next();`if(val == start) {removing = true;continue;}` if(val == end) {` ` removing = false;` ` }`if(removing) {sum+=val;it.remove();}}System.out.println(sum);}` }` ` }` `}`i dont get it... for problem F...T_T
The contest is bad. I don't like this contest. Hello , Fwb !
Although it seems that I am not qualified to evaluate this game at my level, it did indeed disgust many contestants to a large extent in questions D and E, and it seems to be too simple in question F.
You don't need to show that you have problems in your brain by making CP problems.
赛时公告
Unable to parse markup [type=CF_MATHJAX]
\texttt{[2025/08/20 14:07]}Unable to parse markup [type=CF_MATHJAX]
rmb!Unable to parse markup [type=CF_MATHJAX]
\texttt{[2025/08/20 14:56]}Unable to parse markup [type=CF_MATHJAX]
rmb!$$$\texttt{[2025/08/20 15:19]}$$$:恭喜 @SnowTrace 首 A T2!获得 $$$5$$$ rmb!
Unable to parse markup [type=CF_MATHJAX]
$$$\Large\purple{——「夏日炎炎」——}$$$$$$ $$$$$$\green{——「怦然心动」——}$$$$$$  $$$\color{white}\small 赛后一周内800粉福爆照$比赛描述
本场比赛为『Fwb』Round 2 之夏日心动,也是『Fwb』系列里的第二场比赛。自上一场冬日绚礼之后,已经过去了 $$$7$$$ 个月啦。抱歉让大家等我这么久,才来到了我们的第二场比赛。
本场比赛的负责人&出题人为 FwbAway,一切责任和惩罚由我承担。
难度范围大约从 普及 至 提高+/省选-,题目难度为主观增序。**比赛难度和质量较 R1 提高。**
本场比赛为 IOI 比赛,分数取所有提交分数之最大值。共 3 题,时间为 4 个小时。
请参与比赛制作的相关人员不要在赛时提交代码。
希望赛后题目能全部加入主题库。
赛前答疑区(它亖了) | 赛时答疑帖 | 赛后总结帖
题目描述
本场比赛的参与人员有(无先后顺序):
注:带 * 的验题人未参与题目最终 AC 代码。
最后要感谢 @Dr_Gilbert 的审核,感谢他纠正比赛题目的问题,感谢他让比赛进行的更顺利!
感谢他们的付出!希望比赛能顺利进行,希望赛后题目全部加入主题库。
奖励
总奖池 $$$75$$$ RMB。
奖励分为三部分。
第一部分 实力奖
对于第 $$$1,2,3$$$ 题的首 A 分别奖励 $$$2,5,8$$$ RMB。
对于第 $$$1,2,3$$$ 名分别奖励 $$$8,5,2$$$ RMB。
若获奖者不需要奖励,奖励将会转给下一名。
请所有获得**实力奖**的人在 $$$48h$$$ 内联系 Solil1019 领取奖励,逾期视为作废。
第二部分 幸运奖
赛后第 $$$a,b,c,d,e$$$ 名**有分参赛人员**可分别获得 $$$2,2,2,2,2$$$ RMB。
其中 $$$a,b,c,d,e$$$ 会由随机数(rand)代码确定,将在赛后总结帖公布。
赛时抢到**赛时答疑帖**的第一排的人将获得 $$$5$$$ RMB(我申请的置顶信息不算)。
赛后抢到**赛后总结帖**的第一排的人将获得 $$$5$$$ RMB(我申请的置顶信息不算)。
请所有获得**幸运奖**的人在 $$$48h$$$ 内联系 KellyH 领取奖励,逾期视为作废。
第三部分,AK 奖
设 AK 的总人数为
Unable to parse markup [type=CF_MATHJAX]
\min(n,10)Unable to parse markup [type=CF_MATHJAX]
RMB。请所有获得**AK奖**的人在 $$$48h$$$ 内联系 lam_dyr 领取奖励,逾期视为作废。
注:虽然该部分奖励由 LG_DHEnry 提供,但请不要联系他领奖。
请注意,由于这三位不会时刻在线,故获奖人员只需要在规定时间内发送申请即可,他们会用最快的时间给您回复。
获奖名单将在赛后总结帖公布,请加团领取奖励。
另外粉福请私信咨询,注意关注犇犇消息。分为 0.8k 粉福和 1k 粉福。
比赛公告
Unable to parse markup [type=CF_MATHJAX]
\texttt{[2025/07/26 20:36]}$$$:修改 A 题题面,扩大数据范围。$$$\texttt{[2025/07/27 09:37]}$$$:将比赛时间后延至 8/17。
$$$\texttt{[2025/08/04 11:32]}$$$:修改 B 题题面的四个问题。
$$$\texttt{[2025/08/06 10:30]}$$$:添加 B 题部分分并美化题面,增强可读性。
$$$\texttt{[2025/08/06 18:20]}$$$:通过审核(这该算几审?)。
$$$\texttt{[2025/08/07 09:33]}$$$:修改比赛界面,并增加~~已亖的~~赛前答疑区。
$$$\texttt{[2025/08/12 20:08]}$$$:和梦熊比赛重了,后延一周。
$$$\texttt{[2025/08/13 09:27]}$$$:和梦熊比赛又重了,前移三日。
$$$\texttt{[2025/08/13 18:05]}$:添加一位 rmb 提供人 LG_DHEnry。
广告
喜欢愚人节比赛的可以来这里:link。
欢迎有能力的人在赛后私信我一起参与比赛制作,要求放在这里了。满足要求的告知 @FwbAway 来获取加入备用团队 ITOI 的机会。特殊的,个人公开赛应加入此团(RMB 提供人员可以无偿加入)。
同上次比赛一样,我还放了一张尾图。

最后,跟我一起喊出这场比赛的口号吧:夏日炎炎,怦然心动!
why random words can farm contribution
This is from a well-known shit round, FWB Round 2, in Luogu.
Is Atcoder out of ideas? Why did you hold a competition that was full of templates and make E the most difficult problem?
AT什么神经AI检测,搞了20分钟了还是进不去
me too
This contest is really SHIT!!! Speailly, Problem D & E are pretty sick.
ABC is more worse.
It seems that many people think this round is not good. Maybe I'll receive many downvotes, but i still consider this round a good round.
You may think this round is too hard as a "Beginner Contest". Yes, that's fact. However, this round is very meaningful and educational to me. For example:
At least that's better than previous totally speed round and rounds with too large gap.
Indeed, this round also has shortages, like E easier than F, etc, but abc as an educational contest, this round's meaning is more than its shortage.
Also i think saying something like problem xxx is shit is lack of basic respect. If you have different opinions please comment below
this comment shouldn't be sent out by a candidate master...
this comment shouldn't be sent out by an expert...
What bullshit!
D is full of IF. That's terrible.
Solved D using ternary search
Submission
A good contest for Mr.Fwbeast.
But not a good contest for people.
Oh, for CF people, Mr.Fwbeast has two sh*t contest on Luogu and they both have sh*t problems like this D.
Bad! You need to come up with better questions.
Is ABC out of questions? They had to throw out a code-intensive problem like D.
What a dull contest we participated,D is dull and meaningless. abc421=Fwbaway
Everybody say D is boring , but if you use Relative motion,the code can be very short.
Please don't complain that the question is disgusting, in fact, there should be an easier way.
this is our teachers' code.
https://atcoder.jp/contests/abc421/submissions/68930507
it's just about 60 lines mainly. if you use Relative motion,it can shorter than 50 line.
Without logic, OI will no longer be an art, and so will life.
a boring contest
MESS ROUND
Though my rating increased after this round, I think D and E are the worst problem I have ever met in AtCoder.
I got rank 4700 before I ACed D and became rank 120 after that.
in summary: A < B < F < C < E < D.
C if input BAABABBA why ouput 0?
This abc is so cute!
Then D and F are even cuter.
lan de pen
Fwb Round #421
THE WORST ABC THAT IS.
D is so boring. It shouldn't be appeared in ABC.
I nailed Problem D, but it was only one minute after the competition finished:(
Oh, what a pity
For problem D, I think considering from the two dimension vector might help simplify the implementation. For instance, assuming that two points have positions (x1, y1) and (x2, y2), and current operations have (dx1, dy1) and (dx2, dy2). Then, we should find some positive k satisfying x1+k*dx1=x2+k*dx2, and y1+k*dy1=y2+k*dy2.
Problem E is once again abc's favorite [expectation and maximum] pattern. We should maintain two states, how many steps are left, and what numbers we have kept.
Problem F can be solved based on linkedlist, and in fact I usually use array to simulate the linkedlist. For the query of the second type, we only need to find out whether x is in front of y, or vice versa. We can solve this part by using that classic trick, [one chase after the other one]. We start simultaneously from x and y, and move forward until we meet y or x, and then stop. This method can guarantee a linear complexity O(N).
i think codes of D and E may be too long for beginners
too much negativity. Couldn't solve D but there are worse and more implementation-heavy problems than D. I share my solution I think it's kinda clean ^-^
psdt for the ifs just swap the points so reuse the same if again :b
samples are too weak
Could someone please help with problem E? It’s a really nice problem.
can anyone please enlighten me why the hell does the following problem C solution fail: submission
beware of overflow guys, stay safe ˗ˏˋ ✞ ˎˊ˗
I'm glad I didn't play in this race,
A TERRIBLE round!
Why do they do that?!
D>>F
Pure shit of implementation