相关链接
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4552
神犇题解:http://maghsk.github.io/2016/05/05/20160506-bzoj-4552-tjoi2016heoi2016/
解题报告
之前在BC上看到过这道题:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=680&pid=1004
这就不知道是谁抄谁的了
考虑直接做的话,似乎没法用任何数据结构来维护的样子
于是二分最后的答案 $ p$ ,将小于 $ p$ 的置为0,大于 $ p$ 的搞成1
这样的话,排序操作就变成了区间查询和区间赋值
于是搞一个线段树什么的就可以啦!
361611 118390I dont normally look at these types of internet sites (Im a pretty modest person) – but even though I was a bit shocked as I was reading, I was definitely a bit excited as properly. Thanks for making my day 57263
454133 235124Its not that I want to duplicate your site, but I actually like the style. Could you tell me which style are you employing? Or was it custom created? 477348
761033 920772hello!,I like your writing so significantly! share we communicate extra approximately your post on AOL? I need to have an expert in this space to solve my dilemma. Perhaps that is you! Seeking ahead to see you. 248792
327538 915396Genuinely nice style and design and outstanding content material , absolutely nothing at all else we require : D. 278645
468748 118944Id forever want to be update on new posts on this website , bookmarked ! . 313385
515437 774911Average In turn sends provides may be the frequent systems that supply the opportunity for ones how does a person pick-up biological, overdue drivers, what 1 mechanically increases the business. Search Engine Marketing 100967
126796 864835Hi there! I could have sworn Ive been to this site before but right after reading by means of some of the post I realized its new to me. Anyhow, Im certainly glad I found it and Ill be book-marking and checking back often! 106231
648034 17402Hi there! I merely want to give a huge thumbs up for the very good data you could have correct here on this post. I will likely be coming once more to your weblog for much more soon. 224641
109453 118478Hello! I could have sworn Ive been to this blog before but following browsing by means of some with the post I realized its new to me. Anyways, Im undoubtedly happy I located it and Ill be book-marking and checking back frequently! 877966
515862 925977hey there, your web site is inexpensive. We do thank you for work 604602
243639 689183Some genuinely nice and utilitarian information on this web website , likewise I believe the style and style contains superb capabilities. 16570
48993 887780Ive writers block that comes and goes and I want to discover a way to get rid of my writers block. It can occasionally be so bad I can barley make sentences. Any tips? 391391
614272 334166hello excellent site i will definaely come back and see once more. 910058