Can someone tell the approach for this interesting question: Question
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Can someone tell the approach for this interesting question: Question
Name |
---|
Correct me if I'm wrong. My first thought for this problem was dp. dp(i) -> maximum posters till i th element in some defined order that works (maybe sort using x and y?) but soon became doubtful if such an order even exists. For all 2 pairs we can find if the 2 posters are overlapping or not. If we create a graph and add edge b/w 2 nodes (posters) if they are NOT overlapping, then we need to find the largest connected component size which is completely connected (edge b/w every pair #E=n(n-1)/2)
this is a matching problem , it kinda makes sense that no greedy/dp algorithm would work even if you didnt knew the tags tho.Most of the time if it is a problem about selecting things that are limiting each other by someway and no greedy seems to work, it is a matching problem.You can learn bipartite matching algorithm and then try the problem again
I keep false solving