![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm_线段树
wdcxccsdn
这个作者很懒,什么都没留下…
展开
-
hdoj1542_Atlantis(线段树)
看了这篇后理解的:here// hdoj1542_Atlantis.cpp : Defines the entry point for the console application. // 线段树求并面积#include "stdafx.h" #include<iostream> #include<vector> #include<iomanip> #include<algorithm> usin原创 2015-05-14 10:33:46 · 313 阅读 · 0 评论 -
hdoj1255_覆盖的面积(线段树)
线段树求交面积// hdoj1255_覆盖的面积.cpp : Defines the entry point for the console application. //#include<iostream> #include<vector> #include<iomanip> #include<cstdio> #include<algorithm>using namespace std;struc原创 2015-05-14 11:44:17 · 297 阅读 · 0 评论 -
hdoj1264_Counting Squares(线段树)
线段树求并面积,注意输入数据的坐标顺序#include<iostream> #include<vector> #include<algorithm>using namespace std;struct node{ int l, r, f,clen; };struct seg{ int l, r, h,f; };node nodes[100000]; vector<int> pos;原创 2015-05-20 13:21:58 · 330 阅读 · 0 评论 -
hdoj1156_rownie Points II(线段树)
题意:stan画一条竖线,ollie画一条横线,一人两个象限,Stan最大化自己的最小可取值 注意点:画的线上的点不可以取,可能存在多个竖线画法(横坐标不同,横坐标相同是同一类画法),取每一个画法的Ollie的可取最大值,但是最后输出结果需要去重#include<iostream> #include<vector> #include<algorithm> #include<utility> #i原创 2015-05-28 09:40:46 · 381 阅读 · 0 评论 -
hdoj1540_Tunnel Warfare(线段树)
#include<iostream> #include<algorithm> #include<stack> using namespace std;struct node{ int l, r, lcov, rcov, mcov; bool fcov(){ return r - l + 1 == mcov; } };node nodes[200000]; stack<int> sta原创 2015-06-11 00:48:01 · 415 阅读 · 0 评论