TOYOTA MOTOR CORPORATION Programming Contest 2023#2 (ABC302) Announcement
source link: https://codeforces.com/blog/entry/116609
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
We will hold TOYOTA MOTOR CORPORATION Programming Contest 2023#2 (AtCoder Beginner Contest 302).
- Contest URL: https://atcoder.jp/contests/abc302
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20230520T2100&p1=248
- Duration: 100 minutes
- Number of Tasks: 8
- Writer: [user:math957963], PCTprobability, Nyaan, YoshikaMiyafuji
- Tester: MMNMM, Nyaan
- Rated range: ~ 1999 The point values will be 100-250-250-400-425-500-625-625.
We are looking forward to your participation!
If you have difficulty accessing the contest, please refer to the problem statement distributed here. https://img.atcoder.jp/abc302/tasks.pdf
For measures to deal with difficult access situations, please click here. https://atcoder.jp/posts/1028
3 days ago, # | Yet another contest with adjusted difficulty:P |
how to do merge set? is it a graph question ? |
problem Ex is a difficult version of this problem using rollback dsu |
3 days ago, # | Is there is any corner case left for my submission for problem B submission |
3 days ago, # | Why the editorial is only in japanese , please provide english editorial as well |
2 days ago, # | Damn, I managed to misread E and thought we needed to output the number of connected components. Spent 30 minutes trying to understand why removing all edges adjacent to some vertex makes Fully Dynamic Connectivity easier (I think it doesn't btw)... Nice contest though, quite balanced! |
2 days ago, # | This contest was really good,i think G is much easier than previous contests. |
-
can you share your approach to it, there's no editorial to refer to
2 days ago, # | Can E be solved using segment tree? I've tried to solve it using seg tree, but it gave me TLE. |
-
segtree not needed
-
I assumed that I could update each vertex by its number of Neighbours if op is 1, if op is 2 then I made a removal function to erase it from each Neighbour then erase all of its Neighbours.
-
You could store neighbour for each vertex in aa set and do the operations as you mentioned, since we are only removing the edges we add and they're limited(<1e5) .
-
-
2 days ago, # | In problem F can answer be greater than 3? |
I misread problem F to be: find the minimum number of merge operations to get a union set that it contains all numbers from 1 to M :(. I am curious if this modified version can be solved within the time limit. Does anybody know how to solve this version? This version has become very close to the Minimum Set Cover problem, which is NP-hard. The only difference is that we can only merge two sets if they intersect. I feel like with this constraint, the problem is even harder to solve, so it should still be NP-hard? |
-
If we add number in all sets, then constraint "we can only merge two sets if they intersect" is gone, and we are solving Minimum Set Cover on numbers from to . So, it's NP-hard.
-
If the goal is to use the minimum number of merge operations to get all numbers in [1, M], why can we add M to all sets? Doesn't this change what we want to achieve?
-
I mean, I described how to build an input for yours problem that makes it equivalent to Minimum Set Cover problem. So, the special case of your problem where belongs to all sets is equivalent to Minimum Set Cover. Therefore the whole problem is also at least NP-hard.
-
-
Hmm, can't we solve it greedily in a following way?
Suppose currently we have set , then take set and merge it with , where:
- shares at least one element with .
- The number of elements that adds to is maximized.
I think it can be proved in the way Prim's Algorithm is proven.
-
No, it is wrong.
Contercase(consider start from ):
-
In the beginning we will start from the set with maximum length.
-
-
Isn't answer 2?
We start from , add or and then add .
-
My bad, let me try again
and I found out actually this algorithm is writen in the wiki of set cover problem, and it said it is actually an approximate algorithm with ratio where is the -th harmonic number, so maybe this is the reason why it is so hard to find a counter example with small . D:
-
-
-
-
-
2 days ago, # | Can someone tell me if this solution is actually correct for EX or not? https://atcoder.jp/contests/abc302/submissions/41570525 I didn't proof the complexity but I thought that in a random alignment, the complexity should go to the average case instead of the worst case so it might pass. Can anyone come up with a proof countercase? |
38 hours ago, # | Regarding the Japanese editorial of problem , can someone explain why * works? * is the number of occurrences of which are in a location where should be, and is the maximum value through all permutations of . |
-
Is is a lower bound on the answer. First, let's try to do some simpler lower bound. We obviously have to do at least swaps. Then we have to do at least swaps because we already counted all the swaps. And so on. But the lower bound also would work if we did it in any other order of . So this is a lower bound. But I don't really know how to prove it that we can always do it in this number of swaps.
Why did I TLE on the after-contest testcase for F? I did multi-source BFS starting from sets containing the elments 1, and then I keep going to the other sets to try to reach m. Is it constant factor? Here is my submission: https://atcoder.jp/contests/abc302/submissions/41632920 |
-
Your bfs is quadratic in time, because on each iteration you take each set in the queue, and for each of its elements you put every set that has that element back in the queue. This amount of queue additions can be quadratic, since you can have a lot of sets with the same distance that share an element.
Take a case where , the first set is , then there is an arbitrary amount of sets , then there is one set and one .
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK