摘要:
题意:给你一个建筑物群的轮廓,求该建筑物群最少由几栋楼房组成(楼房是矩形)思路:贪心一看数据范围怎么大,搜索神马的就算了从后往前扫,将符合的都标记掉(注意高度为0的没有楼房)View Code #include<stdio.h>#include<string.h>const int N=50009;struct data{ int x,y;}s[N];bool used[N];int main(){ int n,w; while(scanf("%d%d",&n,&w)!=EOF) { int i,j; for(i=1;i<=n; 阅读全文
posted @ 2011-12-02 15:39 huhuuu 阅读(376) 评论(0) 推荐(0)