We will hold AtCoder Beginner Contest 474.
- Contest URL: https://atcoder.jp/contests/abc474
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20260906T1310&p1=248 (Irregular start time!)
- Duration: 100 minutes
- Writer: sounansya, vwxyz0
- Tester: harurun4635, KumaTachiRen
- Rated range: ~ 1999
- The point values: 100-200-300-400-450-500-575
We are looking forward to your participation!








I hope I could solve Task A~D.
I hope I can solve Task A~E.
I hope I solve A,B,C,D,E.
Hopefully I solve A,B,C,D!!
I hope I will solve A,B,C,D.(%%%) (I am a Chinese student)
Irregular
Hope not rubbish round.
Why is this ABC contest on Sunday instead of Saturday?
i HOPE ...
I hope that we won’t get another TERRIBLE problem like last time’s Problem D.
hope i can wirite A,B,C,D.my Rated is to low
I hope it
Thank god this contest starts on 12:10(UTC+8)(I have to go to school at 18:00)!
Why Sunday?
Maybe I can't solve D,I think it's hard.
Solve only A problem
没人AK吗?(Chinese Students)
Please use English to comment on CodeForces.
指的什么,
Well,I solve the D.
YESSSS Finally solved A-D!!! I think I had the idea for E but couldn't implement in time
I solved A~D too
Nice job man!
How do you solve E?Greedy?
我觉得是反悔贪心,先假设所有东西都不用优惠卷,然后依次按 $$$a_i - b_i$$$ 从大到小的顺序尝试将其用优惠卷购买,如果优惠卷不够,就可以尝试用原价额外购买 $$$a_i$$$ 最小的东西以获得足够的优惠卷(当然,前提是这样更划算)。我这样成功的 AC 了。
I used Chinese to anser this question because I am not good at English. You can try to translate it by AI if you can not get it.
You can look my submit
my atcoder name is same codeforces
I think my solution is easy
I don’t go at English
bro why do chinese comments get downvoted fast? can anyone answer?
I suspect that many of the downvotes come from Chinese users. They may feel that using Chinese in an English-language discussion is out of place. However, I don’t think there’s anything wrong with this comment, especially since the commenter explained that he used Chinese because his English isn’t very good.
Yes, I saw some easier ways to solve this problem then mine.
at the time of contest I thought of a similar idea as Atcoder ABC 437 C. But I had too little time so did not solve it.
i am idiot.
zero...
0x3f.... > 1e18 :(
ac
**HOW F?61/71 **
Sometimes you need to go above mx.
Smallest counterexample has N=94.
Would you like to share with us that counter example. Really curious to know what is it. Thank you so much!
Correct output: 47.
Choose each index from 48 through 94 once; every element becomes 48.
Thank you so much for your kind reply, a really beauitful counter example!!
By the way, would you like to tell (teach) us, why intuitively the above solution is wrong?
Because that approach is very very intuitively correct, at least for me.
What kind of mind trap did I fall into?
The mind trap is accepting unproven statements into your logic.
In the case of this problem, your entire algorithm is correct... assuming everyone should become mx. This part of the solution is so small that maybe you don't realize that this is unproven. And as demonstrated, it's actually really hard to come up with a counter example in your head.
The solution is to develop a practice of having a proof behind every claim you use. It takes care, and it's definitely easier said than done. Even the best of the best will use unproven observations sometimes.
Anyway, the knowledge that the target need not be mx finishes the problem for you. Now you just need to see if a feasible common value exists. The cost for a particular target will just be a linear function in terms of that target.
Thank you so much for giving me such invaluable inspirations and suggestions. It is true that, somehow I believe "become max" is correct and consider it as a "fact". Yes, I should be more careful about this in the future.
Thank you so much for giving me such invaluable inspirations and suggestions. It is true that, somehow I believe "become max" is correct and consider it as a "fact". Yes, I should be more careful about this in the future.
Could you tell me how you think and make this corner case?
Why there's still no official editorial?
I think that I am very weak than the bosses. I just passed problem G once! This maybe because this problem is so similar to abc454_e, and I solved it ago.
I hope I could solve Task A~C.
For problem G, how to prove that a correct k satisfies k%2=0 ?