Description
Solution
01字典树模板题,删除操作用个数组记录下就行了
Code
#include#include #include int n,T[9000010][2],v[9000010],A[300010],num[9000010],rt=1,B[300010];inline int read(){ int x=0,f=1;char ch=getchar(); while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();} while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();} return x*f;}void Insert(int x,int id){ int u=0,op; for(int i=30;i>=0;--i){ op=((x&(1< =0;--i){ op=((x&(1< =0;--i){ op=((x&(1<