HBC214017Squared Permutation,线段树,树状数组,数据结构Charging题解

凸凸曼凸凸 算法基础篇 56 0
想要检验自己的编程水平?来试试全网最全C++题库,让您在挑战中不断进步。
Xxy is the king of the universe. In order to resist the invasion, he ordered the construction of many space warships.Now,he wants to charge his space ships. He has N space ships.The N ships are numbered from 1 to N and lined up in order. Xxy has M charging plans.The i-th plan is describe by two positive integers li,ri.It means in this plan, he will charge the ships numbered from li to ri. Xxy will choose some of these plan.If he totally choose tot plans,x is the number of ships that charged in every plans.Xxy want to maximize the value of min.

Xxy is the king of the universe. In order to resist the invasion, he ordered the construction of many space warships.Now,he wants to charge his space ships. He has N space ships.The N ships are numbered from 1 to N and lined up in order. Xxy has M charging plans.The i-th plan is describe by two positive integers li,ri.It means in this plan, he will charge the ships numbered from li to ri. Xxy will choose some of these plan.If he totally choose tot plans,x is the number of ships that charged in every plans.Xxy want to maximize the value of min(tot,x).

HBC214017Squared Permutation,线段树,树状数组,数据结构Charging题解
-第1张图片-东莞河马信息技术
(图片来源网络,侵删)
成为编程大师,不再是梦想!全网最全C++题库,助您开启编程新篇章。

标签: HBC214017Squared Permutation 线段树 树状数组 数据结构Charging题解