
扫描线
chr1st0pher
Dancer on the keyboard
展开
-
Codeforces 1401E. Divide Square (扫描线 + 线段树)
Description There is a square of size 106×106 on the coordinate plane with four points (0,0), (0,106), (106,0), and (106,106) as its vertices. You are going to draw segments on the plane. All segments are either horizontal or vertical and intersect with at原创 2020-09-03 07:21:06 · 233 阅读 · 0 评论 -
Gym - 101982F Rectangles (扫描线)
Description You are given several axis-aligned rectangles. Compute the sum of the area of the regions that are covered by an odd number of rectangles. Input The first line of input contains a single integer n(1≤n≤1e5)n (1 ≤ n ≤ 1e5)n(1≤n≤1e5), representing原创 2020-07-04 11:30:38 · 276 阅读 · 0 评论 -
Luogu P1502 窗口的星星 (扫描线)
Description 晚上,小卡从阳台望出去,“哇~~~~好多星星啊”,但他还没给其他房间设一个窗户。 天真的小卡总是希望能够在晚上能看到最多最亮的星星,但是窗子的大小是固定的,边也必须和地面平行。 这时小卡使用了超能力(透视术)知道了墙后面每个星星的位置和亮度,但是小卡发动超能力后就很疲劳,只好拜托你告诉他最多能够有总和多亮的星星能出现在窗口上。 Input 本题有多组数据,第一行为 TTT,表示有 TTT组数据。 对于每组数据: 第一行 333 个整数 n,W,Hn,W,Hn,W,H 表示有 nnn原创 2020-07-03 23:52:17 · 252 阅读 · 0 评论 -
Gym - 102448F Finally, christmas! (扫描线)
Description The christmas spirit is taking over the city of Arcoverde! In honor of this special day, the mayor of this renowned metropolis decided to decorate all of the city’s front view. To do this, he asked his engineer friends Icaro and Cortizo how muc原创 2020-07-03 19:58:46 · 213 阅读 · 0 评论