We will hold AtCoder Beginner Contest 409.
- Contest URL: https://atcoder.jp/contests/abc409
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20250607T2100&p1=248
- Duration: 100 minutes
- Writer: sotanishy, toam
- Tester: math957963, cn449
- Rated range: ~ 1999
- The point values: 100-200-300-400-425-500-625
We are looking forward to your participation!








I'll keep my vote until the contest ends.
Wish I could upvote this contest.
good luck!
4T!!! oh yeah!!!
I hate D!!!!!!!!!:(
D is Easy
The code volume of Problem D is small, but the thinking process is not easy.
No, the thinking process is also easy.
I am surprised my solution for C worked. Lol !
wtf was C do u needed any prior geometry knowledge to solve it?
Knowing that the difference between 3 valid points will be same is enough. Like if the points are a, b, and c clockwise, then dist(a,b)=dist(b,c)=dist(c,a).
E is much easier than regular Es, over 3000 people solved it! Maybe it's the most solved E in ABCs. But that caused a speedcoder for those solved E and couldn't solve F. I got 2239th for solving ABCDE (but I even got 2187th for solving ABCD in ABC403), too bad :(
upd: people who solved ABCDE can get a perf ranging from 1059(2734th) to 1529(1036th)...
Note that E's score ($$$425$$$) is also significantly lower than average.
I'm a bit underwhelmed that Problem F practically forces us to use priority_queue, and set just keeps getting TLE'd
It may explain some TLE submission's reason
What about multiset
WTF using
std::setin F fails while usingstd::priority_queuepass.priority_queue is faster, what's the problem with it?
a yeah but that really struggles...
Bro can you please look into this code for E,I have tried to find it but couldn't I am trying to go from leaves to root, and computing cost each time Code and removing all dependencies of parent of every node before using it to compute cost
Bro the cost of moving a particle upward equals to the cost of moving it downside. So you don't need that much logic
Although they have the same complexity order, but remember that set is based on tree, which may involve some rotation operations, in order to maintain the order, while priority_queue is based on heap, where we just move nodes along the path to the root.
A more intuitive understanding may be that, it costs more if we want to obtain more information.
As we only know the maximum element of the priority_queue, but we could get more information from set, for instance, lower_bound/iterator operations, I think one should forgive that set costs more :D
same
F has a good idea, but the time limit is too strict. I used
map+vectorat first so I got two TLE submissions. That ruined my Performance :(F took a lot of time to implement. Could not submit it in time.
G makes me want to kill myself.
Why my F wrong anwer on the last one.
Code
The Manhattan distance between two points can be greater than mn, so it's better to use a value like inf = 2e9 + 10
in F, i'm getting TLE on 3 cases. Can somebody help me optimize this? The idea is very cool btw. feeling overwhelmed with my solution.
Link
Weak testcases in D: My submission doesn't handle already sorted string input with length greater than 1, still got accepted.
Its very ugly looking, click at your own risk : Link
Edit: Ignore please, the substring length can be 1, i don't know why i was assuming otherwise.