We will hold AtCoder Beginner Contest 471.
- Contest URL: https://atcoder.jp/contests/abc471
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20260815T2100&p1=248
- Duration: 100 minutes
- Writer: kyopro_friends, sheyasutaka
- Tester: vwxyz0, physics0523
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-550-600
We are looking forward to your participation!








Let me introduce an experience to you. "The point values" are generally mentioned in the announcement. You can see that those with a big gap are very difficult. Usually, the difference between E-F-G is smaller. It looks normal this time.
(Maybe F will be a little more difficult this time.)
yes I think so, last beginner contest's F's score is 500, so it will be harder
(I haven't notice this before... even after a lot of contests. thx for pointing out this)
So other problems may be easier
81 years ago ...
Please refrain from posting about 8.15,9.3 and 12.13 again. You may refer to this to see what happened the last time. The writers and testers never mentioned Japanese invasion, and AtCoder only hosts these Beginner Contests on their regular weekly Saturday schedule as usual.
(Partly translate by AI)
UPD: It seems that comments about 12.13 was removed from here. So I'll tell you that many people sent similar messages like this and got lots of downvotes. At last they can't send comments anymore.
That's true . I know this isn't AT's problem.
Since you know it isn't AtCoder's problem, why did you still post that? This is an academic platform.
First , we should remind people with these history.
Next , we shouldn't attack anyone who hasn't join these things .
Then , we need to study and improve ourselves.
Last but not least , thank you for reply me.
This is a programming webstite, not a history website. Why do we need to tell people about something that does not fit into the context at all? If I told you that apples are good for your health in a conversation about cheaters, you'd probably be confused, right?
bro's just farming negative contributions or just ragebaiting atp lol
We're not here to start arguments, and this place is for everyone who loves peace, right? This is Code Forces, we're just gathered here because we share the same interests, it has nothing to do with nationality.
What is Code Forcus? qwq qwqwq qwqwqwq
Oh yes, sorry my mistake hhh.
And now it`s true.
Hope I'll solve F/G again. Can I fly?
chinese can fly?
Failed flying, F WA*1... look forward to the next ABC.
fuck,my classmate use my own account!
Bro thinks you are as strong as ChatGPT
HAHAHA Oh no that's so funny
as strong as Claude Fable 5 too haha
That's amazing. You better come through on it, bro.
if you can use gpt in IOI
Your classmate is so bad.
Your classmate helped you farm a lot of upvotes lol
In the last contest,I only solve A to D.And I want solve 5 problems this time.
good luck
Believe yourself, and you can do that
Good luck for u
Wait, I think I need to give a quick heads up for some people
We know what day it is today. Don't send things like that or flood the comments pls.
This should be a place for discussing problems, not for stirring up ethnic hatred OK?
Hope no one talks about nationalism in today's discussion. Avoid that pls.
Agree. It's just a place to discuss.
I agree with that.Even I'm a Chinese too.But I'm still be confused about that.
I think we should reflect on our discusses AND the silly Japan woman too.
Please don't post any extreme nationalist comments, and don't forget how many people got heavily downvoted last December 13.
Please note that Codeforces is NOT a website for political discussion.
I hope I can solve F.
I hope I can solve G.
Wish everyone can AK ABC!
Please don’t vote before the contest starts
I hope I can solve E and F.
I AK IOI
If you believe that this time, the ranking of the difficulty for these questions is correct, DOWNVOTE me.
Do not publish content unrelated to algorithms/data structures on CodeForces.
qwq
I understand what you are talking about after seeing the first few comments
Chinese Can Fly.
I hope I solve A,B,C,D,E.
%%%
Chinese can FLY!!!
Hope I can solve at least five problems and improve my AtCoder rating.
I was wrong,I'm sorry for that.
1
Chinese people can fly!!!
I am a beginner in OI, so I hope I can solve A, B, and C in this contest. Good luck to everyone!
why chinese can fly then
What a cat! You have been caught.
QP
Good luck and have fun everyone!!!!
Today is August 15th, and many Chinese people know what day it is. World peace is everyone's desire. But I don't think it's correct to send relevant content on atcoder, not to forget national humiliation, rather than to provoke ethnic conflicts. This is just a programming website, it just holds ABC on Saturdays as usual, and you obviously shouldn't provoke ethnic conflicts and ethnic opposition here. Extreme nationalists have almost achieved it.
111
yes.
you are AC.
zc
zc
Chinese love peace.Chinese don't afraid of wars.
zc
I didn't manage to get the perfect score on ABC on the 81st anniversary of the victory of the War of Resistance against Japan to show the Japanese what Chinese people can do... So frustrating
How F?
Don't be discouraged, I believe you will be fine. But playing ABC really has nothing to do with the War of Resistance Against Japan, and Takahashi did nothing wrong.
I know, a_small_OIer. I didn't mean to attack or insult anyone。
I know you didn’t mean to attack other ethnic groups or countries; I just wanted to say that this wasn’t the original intention or purpose of ABC.
Hugs to you – I’m sorry to hear about the rating points you’ve lost; they’ll come back next time.
You’re about to AK ABC.
我去 %%%
……
I'm so bad at this, how can I accept being worshipped?
%%%英语大佬
Nonono my English is only $$$114.5/120$$$(whk), in Codeforces you need to use English.
I 又双叒叕(again and again) lost a lot of ranting... I am a big
.
the discuss of ABC is in CF? So crazy
AtCoder does not have its own discuss forum. It never had.
hyw?
Because Atcoder is lazy
i m chinese ,i can fly !
Hope i can solve ABCDEF
Thanks to my teacher,I need to leave at 9:10 p.m. But I must solve A-E. What can I say?
rp++
rp++, you will AK ABC!
++rp
rp++ good luck for you
you will AK ABC
I hope I can solve A~D.
Accessing AT is very stuck now, and there may be some obstacles.
I hope I can solve ABCDE.
In spite of the fact that it's August 15th, the 81st anniversary of Japanese invasion, world peace is what we all like and AtCoder just provides a programming contest as usual. No ethnic nationality bias should appear. Takahashi does not do anything wrong.
Don't see Takahashi as Takaishi (?)
You're Right!!! We should approach this competition with a proper attitude, rather than merely using it to promote extreme nationalist rhetoric that is unrelated to the algorithm competition!!!
I want gold perf! I want blue name!
I solved A, B, D so far
D is so easy, isn't it?
wow,l also solve A,B,D
My perf is 954 now. -- ac-predictor
Hi, can you send the link for the extension pls?
bro,l only solve A,B,C,D.l think E is to diffcult for me.
l solve A,B,C,D,E now.
E is very esay,isn't it(copy the OP)
In E, you can see that for a sequence $$$x_1, \dots, x_k$$$,
So the problem transfers to calculate this:
You can see that in the first term
, each $a_i^2$ is counted exactly $$$\binom{n - 1}{k - 1}$$$ times, because there are exactly $$$\binom{n - 1}{k - 1}$$$ subsets of $$$a_1, \dots, a_n$$$ that contain $$$a_i$$$.
So the first term is:
Similarly, you can see that the second term
can reduce to:
because for each pair $(i, j)
Unable to parse markup [type=CF_MATHJAX]
, there are $$$\binom{n - 2}{k - 2}$$$ subsets of $$$a_1, \dots, a_n$$$ that contain $$$a_i$$$ and $$$a_j$$$.After all, the problem reduces to calculating:
Time complexity is $$$O(n)$$$.
Well, I solved C in the last 15 seconds
Good problems, ran out of time solving $$$F$$$ :(
bruh WA on 1 test case...
Man, I was stuck on C... can anyone explain how to solve?
Just implement it
brother if we store cookies position in set then we can know if the left or right cookies from the current position exist and if so then we know what are left right cookies positions, from this you can case work it brother 👍
Solution discussion: https://www.youtube.com/watch?v=mL5MxaOwdo8
Why so many NTT?
Why so many NTT?
Why this is not working ??? for Problem D got wrong at some hidden test cases
What's the difficulty of ABC today?
F is so dirty and G is an NTT template.
I agree.
Idont agree,F is interesting!
If you analyze it properly, F is not dirty.
Well, I think F do not fit very well in ABC.
Can You please tell me for which case it is failing for Problem C
https://atcoder.jp/contests/abc471/tasks/abc471_c
You can brute-force but using a multiset for $$$O(\log n)$$$ finding
How to submit an after-test(a hack)?
There is a hack on F:
in:
out:
Some submissions' out is 1000,such as——
https://atcoder.jp/contests/abc471/submissions/78428374
https://atcoder.jp/contests/abc471/submissions/78420018
But the rating is calaulated.
78428374 is my submissions,thanks for hacking me.The data is so weak that many people(such as me) AC this problem with a wrong solution
I do not wish to see politically related content in the comment section, as this is an academic programming exchange platform. Unfortunately, I saw such comments in a very prominent position near the top of the comment section.
can u guys pls tell me why this wrong in E????
Your mod is a little too specific, it's like a rotavirus for my eyes.
its C(n — 2, k — 2) for the sum of v[i] * v[j] 's
In my view Problem F is harder than G :(
Good job task E, make me imprisoned for an hour!
difficulty can sometime be subjective to me too, a lot did solved it so fast like ~12 mins whereas it took me like ~30-40 mins to finally notice that it could be contribution per unit😅
Again an AtCoder contest blog and again Japanese Invasions ._.
How did you solved E problem Editorial didn't give much ideas
I sucked at implementing E :/,
Can someone help me in finding the error in this code , i'm getting WA on random test cases,
In suffix it may be better to keep the sum modulo mod so that there is no overflow when calculating arr[i]*suffix[i+1]
Thanks man, now i'm feeling really dumb ≡(▔﹏▔)≡