// 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…
Double Queue Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15786 Accepted: 6998 Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provid…
Description The new founded Balkan Investment Group Bank (BIG-Bank) opened a new office in Bucharest, equipped with a modern computing environment provided by IBM Romania, and using modern information technologies. As usual, each client of the bank i…
http://poj.org/problem?id=3461 Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 41051 Accepted: 16547 Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a mem…
type rec=record lc,rc,v,rnd,size,w,fa:longint; end; var n,root,tot,ans,opt,x,i,po:longint; tr:array[0..100000] of rec; procedure rotl(po:longint); var y:longint; begin y:=tr[po].rc; tr[po].rc:=tr[y].lc; if tr[y].lc>0 then tr[tr[y].lc].fa:=po; tr[y].f…
第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…