// by SiriusRen #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int cnt=0,jy,a[30500],n,m,root=-1; struct node{ int left,right,count_left,count_right,key,priority; }treap[30500]; void zig(int &x){ int y…
第k大数维护,我推荐Treap..谁用谁知道.... Black Box Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5999 Accepted: 2417 Description Our Black Box represents a primitive database. It can save a…