摘要: 只需要把询问按x升序排序,在查询的过程中不断让树状数组把<=x元素的下标处+1即可。(为此,把序列按val排序) #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; pair<int, int> a[N]; #d 阅读全文
posted @ 2022-04-18 21:25 _vv123 阅读(140) 评论(0) 推荐(0) 编辑