https://ru.algorithmica.org/cs/decomposition/scanline/ Способ решения задачи #3 на контесте 310 878 viewsSanzhar Suleimenov, edited 05:33