当前位置:网站首页>Luogu P1110 report statistics multiset stl good question
Luogu P1110 report statistics multiset stl good question
2022-08-09 07:40:00 【swust_fang】
Question link
In the beginning, what I thought was that multiset maintains the order structure, and then finds the predecessor and successor of the current point added when all the value differences are the smallest, and then uses the line segment tree to maintain a minimum difference value when looking for two adjacent ones~,But later found out that it is global, just open another multiset to maintain the difference between adjacent segments, but it is time-consuming to delete the set, not all adjacent points are installed in the set, such as adding in a certain segmentAt one point, the difference of the previous point is directly stored with an ans to store the minimum value, and then the minimum value in the set of the output time difference can be compared with ans.
#include#include#include#include#include#include#include#include#include
边栏推荐
猜你喜欢
随机推荐
HDU - 3183 A Magic Lamp 线段树
Important news丨.NET Core 3.1 will end support on December 13 this year
Invoker 2019CCPC秦皇岛站I题 简单DP
2017icpc沈阳 G Infinite Fraction Path BFS+剪枝
Oracle 限制时将空值排除
半导体新能源智能装备整机软件系统方案设计
Native JDBC operation database
MUV LUV EXTRA 2019CCPC Qinhuangdao Station J Question KMP
rsync:recv_generator: mkdir (in backup) failed:Permission denied (13) |failed to set times on '.'
基于布朗运动的文本生成方法-LANGUAGE MODELING VIA STOCHASTIC PROCESSES
搭载开源鸿蒙系统的嵌入式XM-RK3568工业互联方案
Better Scroll Y上下滚动无法上拉滚动解决办法
String类创建的对象在JVM中的内存分配和equals与==的区别
入门cv必读的10篇baseline论文
【Docker】Docker安装MySQL
记录一次客户的APP数据库版本号升级失败的情况
SSL证书最长有效期13个月,还有必要一次申请多年吗?
更改Jupyter Notebook默认打开目录
ImportError: cannot import name ‘imresize‘
Anaconda use proxy