CF競(jìng)賽題目講解_CF1354D(樹狀數(shù)組)
2022-08-01 09:43 作者:Clayton_Zhou | 我要投稿
https://codeforces.com/problemset/problem/1354/d
if??1≤ki≤n, then the?i-th query is "insert?ki?into the multiset";
if?ki<0, then the?i-th query is "remove the?|ki|-th order statistics from the multiset". For this query, it is guaranteed that?|ki|?is not greater than the size of the multiset.
在這個(gè)程序里面,使用樹狀數(shù)組統(tǒng)計(jì)數(shù)據(jù)個(gè)數(shù)。
標(biāo)簽: