写道数据结构练练手哈哈哈 // It is made by XZZ #include<cstdio> #include<algorithm> #include<cstdlib> #include<ctime> #define il inline #define rg register #define vd void #define sta static #define pr pair<int,int> typedef long long ll;…
#include<cstdio> #include<algorithm> #include<cstring> #define N 80010 #define which(x) (ls[fa[(x)]]==(x)) using namespace std; int id[N],pos[N],sz[N],ls[N],rs[N],fa[N],tot,n,m,root,a[N]; ]; +sz[ls[x]]+sz[rs[x]];} int Build(int l,int r,i…
SuperMemo 题目链接 Your friend, Jackson is invited to a TV show called SuperMemo in which the participant is told to play a memorizing game. At first, the host tells the participant a sequence of numbers, {A1, A2, ... An}. Then the host performs a series…