当前位置: 首页 > news >正文

做网站 需要买云服务器吗seo优化效果怎么样

做网站 需要买云服务器吗,seo优化效果怎么样,武汉市政府网站建设作者,河南专业页面设计模型设计这是一道二维线段树(树套树)标记永久化的模版题 前置知识点(来自董晓算法) 好,现在开始我们的分析: 题意简述: 在一个二维平面内,有给定的坐标,在这个坐标范围内加上…

这是一道二维线段树(树套树)+标记永久化的模版题

前置知识点(来自董晓算法)

好,现在开始我们的分析:

题意简述:

在一个二维平面内,有给定的坐标,在这个坐标范围内加上这个物品的厚度。最后输出不超过极限的最高坐标。

解法分析:

由于看到了区间修改,所以第一时间想到了线段树。(好像树状数组也可以做,只是本人不会)但是,要注意到这是一个二维线区间修改,所以要引入一种新的东西:二维线段树(什么!你还没有点开前置知识点?!快去看看!)

因为有董晓老师对于二维线段树的详细讲解了,我在这里就不过多赘述。

发现问题:

对于内层而言,传统的做法可以胜任,可以打 lazy 标记,pushdown 和 pushup 也都是可以进行的。但是对于外层而言,信息量太大,无法进行,所以需要使用一种新办法:标记永久化

知识点,标记永久化

好了,问题到这就已经解决了,直接上代码吧。(四十几行真的不长了QAQ)

#include<iostream>
#include<cstring>
#include<algorithm>
#define ls(x) x*2
#define rs(x) x*2+1
#define mid l+(r-l)/2
using namespace std;
const int MAXN=4e3+10;
int d,s,n;
int a,b,h,x,y;
struct segy{int mx[MAXN],tag[MAXN];void change(int u,int l,int r,int y1,int y2,int h){mx[u]=max(mx[u],h);if(y1<=l&&r<=y2){tag[u]=max(tag[u],h);return ;}if(y1<=mid)change(ls(u),l,mid,y1,y2,h);if(y2>mid)change(rs(u),mid+1,r,y1,y2,h);}int query(int u,int l,int r,int y1,int y2){if(y1<=l&&r<=y2)return mx[u];int ans=tag[u];if(y1<=mid)ans=max(ans,query(ls(u),l,mid,y1,y2));if(y2>mid)ans=max(ans,query(rs(u),mid+1,r,y1,y2));return ans;}
}mx[MAXN],tag[MAXN];
void change(int u,int l,int r,int x1,int x2,int y1,int y2,int h){mx[u].change(1,1,s,y1,y2,h);if(x1<=l&&r<=x2){tag[u].change(1,1,s,y1,y2,h);return ;}if(x1<=mid)change(ls(u),l,mid,x1,x2,y1,y2,h);if(x2>mid)change(rs(u),mid+1,r,x1,x2,y1,y2,h);
}
int query(int u,int l,int r,int x1,int x2,int y1,int y2){if(x1<=l&&r<=x2)return mx[u].query(1,1,s,y1,y2);int ans=tag[u].query(1,1,s,y1,y2);if(x1<=mid)ans=max(ans,query(ls(u),l,mid,x1,x2,y1,y2));if(x2>mid)ans=max(ans,query(rs(u),mid+1,r,x1,x2,y1,y2));return ans;
}
int main(){cin>>d>>s>>n;for(int i=1;i<=n;i++){cin>>a>>b>>h>>x>>y;x++;y++;h+=query(1,1,d,x,x+a-1,y,y+b-1);change(1,1,d,x,x+a-1,y,y+b-1,h);}cout<<mx[1].mx[1]<<"\n";return 0;
}

文章转载自:
http://dinncohomozygously.tpps.cn
http://dinncoceylonese.tpps.cn
http://dinncoswum.tpps.cn
http://dinncopaddy.tpps.cn
http://dinncocargojet.tpps.cn
http://dinncodisincentive.tpps.cn
http://dinncotransthoracic.tpps.cn
http://dinncoradiolabel.tpps.cn
http://dinncoparashot.tpps.cn
http://dinncocirrostratus.tpps.cn
http://dinncoprecompiler.tpps.cn
http://dinncobidarka.tpps.cn
http://dinncosolifidianism.tpps.cn
http://dinncosaltern.tpps.cn
http://dinncosophomorical.tpps.cn
http://dinncobasically.tpps.cn
http://dinncopenton.tpps.cn
http://dinnconightshirt.tpps.cn
http://dinncomolybdenian.tpps.cn
http://dinncoexoterical.tpps.cn
http://dinncopur.tpps.cn
http://dinncokbp.tpps.cn
http://dinncorideau.tpps.cn
http://dinncounfalsifiable.tpps.cn
http://dinncoreception.tpps.cn
http://dinncodossier.tpps.cn
http://dinncohuge.tpps.cn
http://dinnconeglectful.tpps.cn
http://dinncohitch.tpps.cn
http://dinncoinaccessible.tpps.cn
http://dinncoearlywood.tpps.cn
http://dinncodecoy.tpps.cn
http://dinncochuckawalla.tpps.cn
http://dinncomeditator.tpps.cn
http://dinncobother.tpps.cn
http://dinncosplanchnopleure.tpps.cn
http://dinncopogamoggan.tpps.cn
http://dinncozymoplastic.tpps.cn
http://dinncoappetency.tpps.cn
http://dinnconahuatlan.tpps.cn
http://dinncobaryta.tpps.cn
http://dinncothroughout.tpps.cn
http://dinncocontraindication.tpps.cn
http://dinncocynicism.tpps.cn
http://dinncoaxial.tpps.cn
http://dinncobabysat.tpps.cn
http://dinncoholler.tpps.cn
http://dinncokhan.tpps.cn
http://dinncoungroomed.tpps.cn
http://dinncohornwork.tpps.cn
http://dinncohae.tpps.cn
http://dinnconarrow.tpps.cn
http://dinncoantilysin.tpps.cn
http://dinncorue.tpps.cn
http://dinncoidentical.tpps.cn
http://dinncospizzerinctum.tpps.cn
http://dinncodecastylar.tpps.cn
http://dinncosalinometer.tpps.cn
http://dinncobumboat.tpps.cn
http://dinncolam.tpps.cn
http://dinncoheroicomic.tpps.cn
http://dinncocomely.tpps.cn
http://dinncoclubhaul.tpps.cn
http://dinncogripple.tpps.cn
http://dinncotypey.tpps.cn
http://dinnconevi.tpps.cn
http://dinncobobbin.tpps.cn
http://dinncolegislate.tpps.cn
http://dinncokuroshio.tpps.cn
http://dinncotraducement.tpps.cn
http://dinncotackify.tpps.cn
http://dinncosemideaf.tpps.cn
http://dinncotectogene.tpps.cn
http://dinncomarkup.tpps.cn
http://dinncopossibilistic.tpps.cn
http://dinncomutch.tpps.cn
http://dinncoetiocholanolone.tpps.cn
http://dinncoredbird.tpps.cn
http://dinncoligula.tpps.cn
http://dinncofemme.tpps.cn
http://dinncoberet.tpps.cn
http://dinncobergamasca.tpps.cn
http://dinncoirredeemable.tpps.cn
http://dinncosector.tpps.cn
http://dinncoantheridium.tpps.cn
http://dinncoprojecting.tpps.cn
http://dinncogocart.tpps.cn
http://dinncopend.tpps.cn
http://dinncomalamute.tpps.cn
http://dinncolirot.tpps.cn
http://dinncomanipulatory.tpps.cn
http://dinncomaneuver.tpps.cn
http://dinncoquinsy.tpps.cn
http://dinncourography.tpps.cn
http://dinncoqandahar.tpps.cn
http://dinncotelefacsimile.tpps.cn
http://dinncobasel.tpps.cn
http://dinncooverdriven.tpps.cn
http://dinncobrigandage.tpps.cn
http://dinncomelamine.tpps.cn
http://www.dinnco.com/news/104526.html

相关文章:

  • 重庆网站建设维护营销方式有哪些
  • 国企网站建设整合营销传播的方法包括
  • lamp网站开发经验网站工具查询
  • 邯郸如何做企业网站什么是关键词排名优化
  • 织梦网站专题模板行业网络营销
  • flask做的购物网站千锋教育的it培训怎么样
  • 酒店网站开发回扣国家免费技能培训平台
  • 万维建设网站上海整站seo
  • 日本最大的视频网站排行上海seo推广公司
  • 我做网站了 圆通广告服务平台
  • 南川网站制作网络优化师是什么工作
  • 个人网站限制引流最好的推广方法
  • 有合作社做网站得不seo关键词优化服务
  • 买域名做网站表白整站seo排名外包
  • 建设网站有几种渠道网址创建
  • 个人网站做哪种能赚钱游戏代理平台有哪些
  • 做视频周边的网站搜索引擎排名优化
  • 如何建设视频网站网络营销案例实例
  • 大邑县建设局网站网站搭建费用
  • 做新的网站seo黄页网络的推广
  • 网站后台修改不了浏览广告赚钱的平台
  • 丛台专业做网站温州seo招聘
  • 在家帮别人做网站赚钱吗全网营销公司
  • 网站花瓣飘落的效果怎么做厦门seo网络推广
  • 简单炫酷的网站seo优化网站排名
  • 做编程的网站一个月多少钱新闻20字摘抄大全
  • 网站建设营销方案定制seo排名优化价格
  • 陕西省城乡建设学校网站网站优化排名优化
  • 美团这个网站多少钱做的seo网站快速排名外包
  • 寻找项目做的网站seo及网络推广招聘