Lang:G++
Edit12345678910111213141516171819202122232425262728293031#define _CRT_SECURE_NO_WARNINGS//#pragma comment(linker, "/STACK:1024000000,1024000000")#include<iostream>#include<cstdio>#include<vector>#include<map>#include<string>#include<queue>#include<cstring>#include<cmath>#include<algorithm>#include<stack>#include<limits.h>#include<set>using namespace std;const int maxn = 100001;// splaystruct Node{Node *ch[2];int r; // 优先级,数值越大,优先级越高int v; // 值int s,addv,mx; // 需要维护的值// mx是当前结点为根的子树中结点最大值,addv是对当前结点为根的子树所有区间操作。bool operator < (const Node& rhs) const{return r < rhs.r;}int cmp( int x ) const { // isLessThanif( x == v ) return -1;