[NOI2003]文本编辑器 没啥好说的 就是个板子 #include <bits/stdc++.h> // #define int long long #define rep(a , b , c) for(int a = b ; a <= c ; ++ a) #define Rep(a , b , c) for(int a = b ; a >= c ; -- a) #define go(u) for(int i = G.head[u] , v = G.to[i] , w = G.…
题意 splay维护即可 code: #include<bits/stdc++.h> using namespace std; const int maxn=2000010; int T,tot,points,root; int fa[maxn],size[maxn]; int ch[maxn][2]; char str[maxn],s[maxn]; queue<int>pool; inline int read() { char c=getchar();int res=0,f=1…