Subscribed unsubscribe Subscribe Subscribe

0w1

Hi everyone, please feel free to have discussions with me!

HDU 1542 Atlantis ( Scanning Line, Segment Tree )

Problem - 1542題意: 給很多矩形的左下角和右上角座標,問聯集面積為何。資料規模: 座標為有理數 N ≤ 100解法: 離散化座標後,由下到上推移掃描線。時間 / 空間複雜度: O( N lg^2 N ) / O( N lg N ) #include <bits/stdc++.h> using namespace std; const int MAXN = 10</bits/stdc++.h>…

ABC 14 C - AtColor ( Imosu + Discretization )

C: AtColor - AtCoder Beginner Contest 014 | AtCoder Problem Statement: Given n ranges [ a[ i ], b[ i ] ], find the maximum covered count of any point. We can use imosu algorithm, where we maintain the value of difference for two adjacent v…