Can someone tell the approach for this interesting question: Question
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
Can someone tell the approach for this interesting question: Question
Название |
---|
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