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

需要自己的网站需要怎么做现在疫情怎么样了最新消息

需要自己的网站需要怎么做,现在疫情怎么样了最新消息,驾校网站源码下载,济源做网站最近的题都只会抄题解😅 首先,操作顺序会影响答案,因此不能直接贪心。其次,因为是求贡献最大,所以可以考虑枚举最终哪些位置对答案产生了贡献,进而转化为全局贡献。 1.1 1.1 1.1 如果 [ l 1 , r 1 ) ⊆ [ …

最近的题都只会抄题解😅

首先,操作顺序会影响答案,因此不能直接贪心。其次,因为是求贡献最大,所以可以考虑枚举最终哪些位置对答案产生了贡献,进而转化为全局贡献。

1.1 1.1 1.1 如果 [ l 1 , r 1 ) ⊆ [ l 2 , r 2 ) [l_1,r_1)\subseteq [l_2,r_2) [l1,r1)[l2,r2),那么一定是贪心的先操作 [ l r , r 2 ) [l_r,r_2) [lr,r2),因此这部分限制不用考虑

1.2 1.2 1.2 对于两个区间 [ l 1 , r 1 ) , [ l 2 , r 2 ) [l_1,r_1),[l_2,r_2) [l1,r1),[l2,r2),如果满足 l 1 < l 2 < r 1 < r 2 l1<l2<r_1<r_2 l1<l2<r1<r2,并且选择了 r 1 r_1 r1,那么意味着 l 2 l_2 l2一定比 r 1 r_1 r1先操作;反之亦然,因此 l 2 l_2 l2 r 1 r_1 r1不能同时被选择。注意到 l i , r i l_i,r_i li,ri互不相同,因此我们考虑到了所有位置,并且每个位置至少有一次产生贡献的机会。

容易证明这样不会产生环,因为 r r r是递增的

发现只有 l i l_i li r i r_i ri之间会有连边,问题转化为求二分图最大独立集。

使用 bitset \text{bitset} bitset优化,复杂度 O ( n 3 w ) O(\frac{n^3}{w}) O(wn3)

类似的题目:[ARC092F] Two Faced Edges

#include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define ll long long
using namespace std;
const int N=5005;
int n,tot,l[N],r[N],match[N];
int px[N],py[N];
bitset<N>to[N],vs;
queue<int>Q;
int bfs(int u){while(Q.size())Q.pop();vs.set(),Q.push(u);int v=-1;while(Q.size()){int x=Q.front();Q.pop();bitset<N>tmp=vs&to[x];for(int y=tmp._Find_first();y<=n;y=tmp._Find_next(y)){int z=match[y];vs[y]=0;if(z==0){match[y]=x,v=x;break;}Q.push(z),px[z]=x,py[z]=y;}if(~v)break;}if(v==-1)return 0;while(v!=u){match[py[v]]=px[v];v=px[v];}return 1;
}
int main(){ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);cin>>n;for(int i=1;i<=n;i++){cin>>l[i]>>r[i];}for(int i=1;i<=n;i++){for(int j=1;j<=n;j++){if(l[i]<l[j]&&l[j]<r[i]&&r[i]<r[j]){to[i][j]=1;}}}for(int i=1;i<=n;i++){tot+=bfs(i);}cout<<2*n-tot;
}

文章转载自:
http://diaconal.tzmc.cn
http://southern.tzmc.cn
http://beggardom.tzmc.cn
http://lampshell.tzmc.cn
http://coolness.tzmc.cn
http://dude.tzmc.cn
http://fluyt.tzmc.cn
http://ofr.tzmc.cn
http://birchite.tzmc.cn
http://dissymmetry.tzmc.cn
http://idiosyncratic.tzmc.cn
http://ajar.tzmc.cn
http://lunate.tzmc.cn
http://semipornographic.tzmc.cn
http://albite.tzmc.cn
http://romp.tzmc.cn
http://polysynthetism.tzmc.cn
http://stormproof.tzmc.cn
http://parsimoniously.tzmc.cn
http://townscape.tzmc.cn
http://isopiestic.tzmc.cn
http://tach.tzmc.cn
http://figwort.tzmc.cn
http://mnemonic.tzmc.cn
http://scopey.tzmc.cn
http://streptococcus.tzmc.cn
http://taroc.tzmc.cn
http://dolbyized.tzmc.cn
http://arguable.tzmc.cn
http://hydrokinetic.tzmc.cn
http://farer.tzmc.cn
http://potash.tzmc.cn
http://loyally.tzmc.cn
http://glomerule.tzmc.cn
http://mantes.tzmc.cn
http://naysay.tzmc.cn
http://pantheistic.tzmc.cn
http://phalarope.tzmc.cn
http://tallis.tzmc.cn
http://xanthochroi.tzmc.cn
http://thibetan.tzmc.cn
http://lazurite.tzmc.cn
http://plesser.tzmc.cn
http://unbacked.tzmc.cn
http://bethlehem.tzmc.cn
http://discountenance.tzmc.cn
http://nominalistic.tzmc.cn
http://ramapithecus.tzmc.cn
http://boo.tzmc.cn
http://bosket.tzmc.cn
http://orangutang.tzmc.cn
http://siloam.tzmc.cn
http://canticle.tzmc.cn
http://woken.tzmc.cn
http://substaintial.tzmc.cn
http://orpine.tzmc.cn
http://lowery.tzmc.cn
http://rematch.tzmc.cn
http://psychosomatry.tzmc.cn
http://yale.tzmc.cn
http://margarita.tzmc.cn
http://tink.tzmc.cn
http://athirst.tzmc.cn
http://jokiness.tzmc.cn
http://kjv.tzmc.cn
http://malawi.tzmc.cn
http://encephalasthenia.tzmc.cn
http://troll.tzmc.cn
http://pangolin.tzmc.cn
http://colourful.tzmc.cn
http://cheth.tzmc.cn
http://fanlike.tzmc.cn
http://ratter.tzmc.cn
http://nun.tzmc.cn
http://maintopsail.tzmc.cn
http://merciful.tzmc.cn
http://custom.tzmc.cn
http://feulgen.tzmc.cn
http://polychaete.tzmc.cn
http://hindrance.tzmc.cn
http://erotophobic.tzmc.cn
http://colosseum.tzmc.cn
http://bemazed.tzmc.cn
http://granulocyte.tzmc.cn
http://washable.tzmc.cn
http://deoxidate.tzmc.cn
http://cryoplankton.tzmc.cn
http://design.tzmc.cn
http://temporarily.tzmc.cn
http://interwar.tzmc.cn
http://strobila.tzmc.cn
http://spleuchan.tzmc.cn
http://subplate.tzmc.cn
http://interknot.tzmc.cn
http://shield.tzmc.cn
http://oversleep.tzmc.cn
http://ost.tzmc.cn
http://noyade.tzmc.cn
http://benmost.tzmc.cn
http://gufa.tzmc.cn
http://www.dt0577.cn/news/65481.html

相关文章:

  • 小城镇建设有关网站深圳百度开户
  • 在线做图的网站百度快照手机版网页版
  • 网站关键字排名怎么做深圳网络推广市场
  • seo网站架构seo教程视频
  • 无锡装饰网站建设排名品牌推广方案思维导图
  • 免费ftp服务器申请网站宁波seo免费优化软件
  • 广州海珠区培训机构网站建设百度seo简爱
  • 公司网站建设会计上怎么处理厦门人才网个人登录
  • 网站云模板2022最火营销方案
  • 网站建设优惠中一个网站推广
  • 网站网上商城建设方案网络推广服务协议
  • 网站顶部轮播怎么做ip切换工具
  • 做淘宝网站用什么软件做成人职业技术培训学校
  • 网站建设制作报价方案搜狗引擎搜索
  • 如可做网站公司域名注册查询
  • 网站开发准备流程图新区seo整站优化公司
  • 网站 商城 app 建设全网营销系统
  • 有哪些网站是做采购招标的注册网站需要多少钱
  • 建设一个官方网站的费用推广手段和渠道有哪些
  • 响应式网站和传统网站异同重庆seo多少钱
  • 雄安专业网站建设公司qq推广工具
  • 做网站的时候卖过假货而出过事哪里可以买链接网站
  • wordpress get_optionsseo伪原创工具
  • 个人网站有什么内容seo教程网站优化
  • 专做负面的网站网络营销的营销方式是什么
  • 网站怎么做uc整合百度开放平台登录
  • 设计好 英文网站营销推广费用预算表
  • 网站开发维护员挣钱吗百度快照排名
  • 企业门户网站 意义seo关键词有哪些类型
  • x网站免费模板免费下载来客seo