摘要: 思路: 1,对y坐标离散化,设有ycnt个不同的y值,在[0,ycnt]上建立线段树 2,建立竖边结构(每个矩形有两条竖边,n个矩形有2*n条竖边): struct Edge{ int yu;//竖边上端点y坐标 int yd;//下端点y坐标 int x;//x坐标 int tag;//竖边类型 } 把所有竖边分为IN和OUT两类,再对x排序,扫描线遇到IN... 阅读全文
posted @ 2008-10-17 16:52 Beetlebum 阅读(854) 评论(0) 推荐(0) 编辑