Luo Gu $ P2824 \ [HEOI2016 / TJOI2016] $ sort + half segment tree

Positive Solutions: half segment tree +

Report problem solving:

Portal $ QwQ $

Aung title Oh good God I have $ jio $ $ QwQQQQQ $ ,,,

We begin to see looked like before the Asian sub-test questions ,,, then carefully Kankan find different Aung $ kk $, where it ranges from $ [1, n] $, and each number appears only once, apparently segment tree can not be used to maintain the number of times each number appeared $ QAQ $

Consider the numbers on the first half of this position, then this number is greater than all the other assigned value of 1 to 0, and then sort press 01, the last in this position is $ check $ 0 or $ QwQ $ 1 to become

$over$

Guess you like

Origin www.cnblogs.com/lqsukida/p/11355778.html