link How to solve B, C? For C i know the solution with 2D-segment tree with lazy propagation, but it looks too scary.
№ | Пользователь | Рейтинг |
---|---|---|
1 | jiangly | 3976 |
2 | tourist | 3815 |
3 | jqdai0815 | 3682 |
4 | ksun48 | 3614 |
5 | orzdevinwang | 3526 |
6 | ecnerwala | 3514 |
7 | Benq | 3482 |
8 | hos.lyric | 3382 |
9 | gamegame | 3374 |
10 | heuristica | 3357 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | atcoder_official | 161 |
3 | Um_nik | 161 |
5 | djm03178 | 157 |
6 | Dominater069 | 156 |
7 | adamant | 154 |
8 | luogu_official | 152 |
9 | awoo | 151 |
10 | TheScrasse | 147 |
link How to solve B, C? For C i know the solution with 2D-segment tree with lazy propagation, but it looks too scary.
Название |
---|
I don't think its possible to solve C using 2D Segtree with lazy.
Let's think about the area covered by each pizza boy, can you see that it forms exactly a square, rotated 45 degrees?
So, the problem now is to find which points are covered by at least K squares. It can be done using Sweep Line. Rotate the squares, it'll become easier.
If you need more details, just talk to me. I still need to read problem B, I'll dedicate some time to it later.
Sweep line... always forget about it. Thank you!