直接上代码 正所谓 人傻自带大常数

平衡树的几种姿势:  AVL Red&Black_Tree 码量爆炸,不常用;SBT 出于各种原因,不常用。

常用:

Treap 旋转 基于旋转操作和随机数堆 但不支持区间操作。

非旋转 基于随机数堆和拆分合并操作 常数较大

时间复杂度:很难被卡,均摊O(logN)

  1. #include<cstdio>
  2. #include<iostream>
  3. #include<cstdlib>
  4. #define MAXN 100005
  5. using namespace std;
  6. int ch[MAXN][],key[MAXN],r[MAXN],size[MAXN],cnt[MAXN],root,sz,n,m;
  7. inline void update(int x)
  8. {
  9. size[x]=size[ch[x][]]+size[ch[x][]]+cnt[x];
  10. }
  11. inline void rotate(int &x)
  12. {
  13. int wh=r[ch[x][]]>r[ch[x][]],son=ch[x][wh];
  14. ch[x][wh]=ch[son][wh^];
  15. ch[son][wh^]=x;
  16. update(x);
  17. update(son);
  18. x=son;
  19. }
  20. void insert(int &now,int x)
  21. {
  22. if(!now)
  23. {
  24. now=++sz;
  25. cnt[sz]=size[sz]=;
  26. key[sz]=x;
  27. r[sz]=(rand()%+rand());
  28. return;
  29. }
  30. if(key[now]==x)
  31. {
  32. cnt[now]++;
  33. size[now]++;
  34. return;
  35. }
  36. insert(ch[now][key[now]<x],x);
  37. if(r[now]<r[ch[now][key[now]<x]])
  38. rotate(now);
  39. else
  40. update(now);
  41. }
  42. void del(int &now,int x)
  43. {
  44. if(key[now]==x)
  45. {
  46. if(cnt[now]>)
  47. {
  48. cnt[now]--;
  49. size[now]--;
  50. return;
  51. }
  52. if(ch[now][]*ch[now][]==)
  53. {
  54. now=ch[now][]+ch[now][];
  55. return;
  56. }
  57. rotate(now);
  58. del(ch[now][key[ch[now][]]==x],x);
  59. update(now);
  60. return;
  61. }
  62. del(ch[now][key[now]<x],x);
  63. update(now);
  64. }
  65. inline int kth(int x)
  66. {
  67. int now=root;
  68. while()
  69. {
  70. if(size[ch[now][]]>=x)
  71. {
  72. now=ch[now][];
  73. continue;
  74. }
  75. int lon=cnt[now]+size[ch[now][]];
  76. if(lon>=x)
  77. return key[now];
  78. x-=lon;
  79. now=ch[now][];
  80. }
  81. }
  82. inline int rank(int x)
  83. {
  84. int now=root,ans=;
  85. while()
  86. {
  87. if(key[now]==x)
  88. return ans++size[ch[now][]];
  89. if(x<key[now])
  90. {
  91. now=ch[now][];
  92. continue;
  93. }
  94. ans+=cnt[now]+size[ch[now][]];
  95. now=ch[now][];
  96. }
  97. }
  98. inline int pre(int x)
  99. {
  100. int now=root,ans=-0x7fffffff;
  101. while(now)
  102. if(key[now]<x)
  103. {
  104. if(key[now]>ans)
  105. ans=key[now];
  106. now=ch[now][];
  107. }
  108. else
  109. now=ch[now][];
  110. return ans;
  111. }
  112. inline int next(int x)
  113. {
  114. int now=root,ans=0x7fffffff;
  115. while(now)
  116. if(key[now]>x)
  117. {
  118. if(key[now]<ans)
  119. ans=key[now];
  120. now=ch[now][];
  121. }
  122. else
  123. now=ch[now][];
  124. return ans;
  125. }
  126. int main()
  127. {
  128. freopen("phs.in","r",stdin);
  129. freopen("phs.out","w",stdout);
  130. scanf("%d",&n);
  131. while(n--)
  132. {
  133. int x,y;
  134. scanf("%d%d",&y,&x);
  135. switch(y)
  136. {
  137. case :insert(root,x);break;
  138. case :del(root,x);break;
  139. case :printf("%d\n",rank(x));break;
  140. case :printf("%d\n",kth(x));break;
  141. case :printf("%d\n",pre(x));break;
  142. case :printf("%d\n",next(x));break;
  143. }
  144. }
  145. return ;
  146. }

旋转Treap

  1. #include<cstdio>
  2. #include<cstring>
  3. #include<iostream>
  4. #include<ctime>
  5. #include<cstdlib>
  6. #define MAXN 100010
  7. using namespace std;
  8. inline int read()
  9. {
  10. int sum=,f=;
  11. char ch=getchar();
  12. while(ch<''||ch>'')
  13. {
  14. if(ch=='-')f=-;
  15. ch=getchar();
  16. }
  17. while(ch>=''&&ch<='')
  18. {
  19. sum=(sum<<)+(sum<<)+ch-'';
  20. ch=getchar();
  21. }
  22. return sum*f;
  23. }
  24. struct Treap
  25. {
  26. struct Node
  27. {
  28. Node *ch[];
  29. int key,v,size;
  30. void pushup()
  31. {
  32. size=ch[]->size+ch[]->size+;
  33. }
  34. }null[MAXN],*root,*stack[MAXN];
  35. int top;
  36. void Init()
  37. {
  38. top=;
  39. root=null;
  40. null->ch[]=null->ch[]=null;
  41. for(int i=;i<MAXN;i++)stack[++top]=null+i;
  42. }
  43. Node *New(int key)
  44. {
  45. Node *p=stack[top--];
  46. p->ch[]=p->ch[]=null;
  47. p->size=;
  48. p->key=key;
  49. p->v=rand();
  50. return p;
  51. }
  52. Node *Merge(Node *a,Node *b)
  53. {
  54. if(a==null)return b;
  55. if(b==null)return a;
  56. if(a->v<b->v)
  57. {
  58. a->ch[]=Merge(a->ch[],b);
  59. a->pushup();
  60. return a;
  61. }
  62. else
  63. {
  64. b->ch[]=Merge(a,b->ch[]);
  65. b->pushup();
  66. return b;
  67. }
  68. }
  69. pair<Node*,Node*> split(Node *x,int k)
  70. {
  71. if(x==null)return make_pair(null,null);
  72. if(x->ch[]->size>=k)
  73. {
  74. pair<Node*,Node*> y=split(x->ch[],k);
  75. x->ch[]=y.second;
  76. x->pushup();
  77. y.second=x;
  78. return y;
  79. }
  80. else
  81. {
  82. pair<Node*,Node*> y=split(x->ch[],k-x->ch[]->size-);
  83. x->ch[]=y.first;
  84. x->pushup();
  85. y.first=x;
  86. return y;
  87. }
  88. }
  89. int getrank(Node *p,int key)
  90. {
  91. if(p==null)return ;
  92. return p->key>=key?getrank(p->ch[],key):getrank(p->ch[],key)+p->ch[]->size+;
  93. }
  94. int getkth(int k)
  95. {
  96. Node *now=root;
  97. while()
  98. if(now->ch[]->size>=k)
  99. now=now->ch[];
  100. else
  101. if(now->ch[]->size+==k)
  102. return now->key;
  103. else
  104. k-=now->ch[]->size+,now=now->ch[];
  105. }
  106. void insert(int key)
  107. {
  108. int k=getrank(root,key);
  109. pair<Node*,Node*> x=split(root,k);
  110. Node *p=New(key);
  111. root=Merge(Merge(x.first,p),x.second);
  112. }
  113. void del(int key)
  114. {
  115. int k=getrank(root,key);
  116. pair<Node*,Node*> x=split(root,k);
  117. pair<Node*,Node*> y=split(x.second,);
  118. stack[++top]=y.first;
  119. root=Merge(x.first,y.second);
  120. }
  121. int prefix(int key)
  122. {
  123. return getkth(getrank(root,key));
  124. }
  125. int suffix(int key)
  126. {
  127. return getkth(getrank(root,key+)+);
  128. }
  129. }YY;
  130. int main()
  131. {
  132. freopen("phs.in","r",stdin);
  133. freopen("phs.out","w",stdout);
  134. YY.Init();
  135. int T=read();
  136. while(T--)
  137. {
  138. int opt=read();
  139. int x=read();
  140. switch(opt)
  141. {
  142. case :YY.insert(x);
  143. break;
  144. case :YY.del(x);
  145. break;
  146. case :printf("%d\n",YY.getrank(YY.root,x)+);
  147. break;
  148. case :printf("%d\n",YY.getkth(x));
  149. break;
  150. case :printf("%d\n",YY.prefix(x));
  151. break;
  152. case :printf("%d\n",YY.suffix(x));
  153. break;
  154. }
  155. }
  156. return ;
  157. }

非旋转Treap

PS:非旋转可以实现平衡树的可持久化,还能来套一些东西

Spaly 完全基于旋转 各种操作

时间复杂度:引用:“ 称单旋无神犇,双旋O(logN),这句话我也没有考证,个人表示不想做什么太多的探究”。毕竟Splay的复杂度本来就挺玄学的了,而且专门卡单旋Splay的题也没怎么听说过。

  1. #include<cstdio>
  2. #define MAXN 200005
  3. using namespace std;
  4. int key[MAXN],ch[MAXN][],cnt[MAXN],size[MAXN],f[MAXN],n,sz,root;
  5. inline void clear(int x)
  6. {
  7. key[x]=ch[x][]=ch[x][]=cnt[x]=size[x]=f[x]=;
  8. }
  9. inline int get(int x)
  10. {
  11. return ch[f[x]][]==x;
  12. }
  13. inline void update(int x)
  14. {
  15. size[x]=cnt[x]+size[ch[x][]]+size[ch[x][]];
  16. }
  17. inline void rotate(int x)
  18. {
  19. int fa=f[x],pa=f[fa],what=get(x);
  20. if(pa){ch[pa][fa==ch[pa][]]=x;}
  21. ch[fa][what]=ch[x][what^];
  22. f[ch[fa][what]]=fa;
  23. ch[x][what^]=fa;
  24. f[fa]=x;
  25. f[x]=pa;
  26. update(fa);
  27. update(x);
  28. }
  29. inline void splay(int x)
  30. {
  31. for(int fa;(fa=f[x]);rotate(x))
  32. if(f[fa])
  33. rotate((get(x)==get(fa)?fa:x));
  34. root=x;
  35. }
  36. inline void insert(int x)
  37. {
  38. if(!root)
  39. {
  40. sz++;
  41. ch[sz][]=ch[sz][]=f[sz]=;
  42. key[sz]=x;
  43. cnt[sz]=size[sz]=;
  44. root=sz;
  45. return;
  46. }
  47. int now=root,fa=;
  48. while()
  49. {
  50. if(key[now]==x)
  51. {
  52. cnt[now]++;
  53. splay(now);
  54. return;
  55. }
  56. fa=now;
  57. now=ch[now][key[now]<x];
  58. if(!now)
  59. {
  60. sz++;
  61. f[sz]=fa;
  62. ch[sz][]=ch[sz][]=;
  63. key[sz]=x;
  64. cnt[sz]=;
  65. ch[fa][key[fa]<x]=sz;
  66. splay(sz);
  67. return;
  68. }
  69. }
  70. }
  71. inline void find(int x)
  72. {
  73. int now=root;
  74. while()
  75. {
  76. if(x<key[now])
  77. {
  78. now=ch[now][];
  79. continue;
  80. }
  81. if(key[now]==x)
  82. {
  83. splay(now);
  84. return;
  85. }
  86. now=ch[now][];
  87. }
  88. }
  89. inline int rank(int x)
  90. {
  91. find(x);
  92. return size[ch[root][]]+;
  93. }
  94. inline int findx(int x)
  95. {
  96. int now=root;
  97. while()
  98. {
  99. if(size[ch[now][]]>=x)
  100. {
  101. now=ch[now][];
  102. continue;
  103. }
  104. int lon=size[ch[now][]]+cnt[now];
  105. if(x<=lon)
  106. return key[now];
  107. x-=lon;
  108. now=ch[now][];
  109. }
  110. }
  111. inline void del(int x)
  112. {
  113. find(x);
  114. if(cnt[root]>){cnt[root]--;return;}
  115. if(size[root]==){clear(root);root=;return;}
  116. if (!ch[root][]){ int oldroot=root;root=ch[root][];f[root]=;clear(oldroot);return;
  117. }
  118. else if (!ch[root][]){
  119. int oldroot=root;root=ch[root][];f[root]=;clear(oldroot);return;
  120. }
  121. int now=ch[root][],old=root;
  122. while(ch[now][])now=ch[now][];
  123. f[ch[old][]]=now;
  124. ch[now][]=ch[old][];
  125. f[ch[old][]]=;
  126. clear(old);
  127. splay(now);
  128. return;
  129. }
  130. inline int pre(int x)
  131. {
  132. insert(x);
  133. int now=ch[root][];
  134. while(ch[now][])now=ch[now][];
  135. del(x);
  136. return key[now];
  137. }
  138. inline int next(int x)
  139. {
  140. insert(x);
  141. int now=ch[root][];
  142. while(ch[now][])now=ch[now][];
  143. del(x);
  144. return key[now];
  145. }
  146. int main()
  147. {
  148. scanf("%d",&n);
  149. while(n--)
  150. {
  151. int x,y;
  152. scanf("%d%d",&y,&x);
  153. switch(y)
  154. {
  155. case :insert(x);break;
  156. case :del(x);break;
  157. case :printf("%d\n",rank(x));break;
  158. case :printf("%d\n",findx(x));break;
  159. case :printf("%d\n",pre(x));break;
  160. case :printf("%d\n",next(x));break;
  161. }
  162. }
  163. return ;
  164. }

Splay

ScapeGoat_Tree 基于a权值平衡树和压扁重构 无旋转 但不支持区间操作;运用a权值平衡树一定是a高度平衡树来维持log的效率;主要操作就是拍扁重建,但是为了解决删除时的繁冗讨论所以维持一个带有已删除点的残树,维持这棵树的高度,同时在维护时维护这棵树的残点不超过一定比例;如果不用cnt那么删除时一定要用找排名的方式,这样的话会防止原来的一子链重建后成为人字链

时间复杂度:最坏会被卡到O(n2)(实际上∑(㏒₂n/i)*(㏒₂i)*i)(只是重建)但是那是把区间从大到小输入(或相反),实际上这是不加常数的结果(此处常数指替罪羊判断不平衡时除了alpha以外的那个常数),一般会是均摊logn(CTR会为了性命而不敢去卡)

  1. #include<cstdio>
  2. #include<iostream>
  3. using namespace std;
  4. const int MAXN=;
  5. const double a=0.75;
  6. struct node
  7. {
  8. node *ch[];
  9. int key,size,cover,ex;
  10. inline void update()
  11. {
  12. size=ch[]->size+ch[]->size+ex;
  13. cover=ch[]->cover+ch[]->cover+;
  14. }
  15. inline bool bad()
  16. {
  17. return ch[]->cover>=cover*a+||ch[]->cover>=cover*a+;
  18. }
  19. }Mem[MAXN],*null,*root,*stack[MAXN],*lst[MAXN];
  20. int len,top;
  21. inline void Init()
  22. {
  23. root=null=Mem;
  24. null->size=null->cover=null->ex=;
  25. null->ch[]=null->ch[]=Mem;
  26. for(int i=;i<MAXN;i++)stack[++top]=Mem+i;
  27. }
  28. inline node *New(int key)
  29. {
  30. node *t=stack[top--];
  31. t->ch[]=t->ch[]=null;
  32. t->size=t->cover=t->ex=;
  33. t->key=key;
  34. return t;
  35. }
  36. inline void travel(node *p)
  37. {
  38. if(p==null)return;
  39. travel(p->ch[]);
  40. if(p->ex)lst[++len]=p;
  41. else stack[++top]=p;
  42. travel(p->ch[]);
  43. }
  44. inline node *divide(int l,int r)
  45. {
  46. if(l>r)return null;
  47. int mid=(l+r)>>;
  48. lst[mid]->ch[]=divide(l,mid-);
  49. lst[mid]->ch[]=divide(mid+,r);
  50. lst[mid]->update();
  51. return lst[mid];
  52. }
  53. inline void rebuild(node *&p)
  54. {
  55. len=;
  56. travel(p);
  57. p=divide(,len);
  58. }
  59. inline node **insert(node *&p,int key)
  60. {
  61. if(p==null)
  62. {
  63. p=New(key);
  64. return &null;
  65. }
  66. p->size++;
  67. p->cover++;
  68. node **ret=insert(p->ch[p->key<=key],key);
  69. if(p->bad())ret=&p;
  70. return ret;
  71. }
  72. inline void erace(node *p,int k)
  73. {
  74. //cout<<p->ch[0]->size<<endl;
  75. p->size--;
  76. if(p->ex&&k==p->ch[]->size+)
  77. {
  78. p->ex=;
  79. return;
  80. }
  81. if(k<=p->ch[]->size)erace(p->ch[],k);
  82. else erace(p->ch[],k-p->ch[]->size-p->ex);
  83. }
  84. inline int Kth(int k)
  85. {
  86. node *p=root;
  87. while(p!=null)
  88. {
  89. if(p->ex&&k==p->ch[]->size+)return p->key;
  90. else if(p->ch[]->size>=k)p=p->ch[];
  91. else k-=p->ch[]->size+p->ex,p=p->ch[];
  92. }
  93. }
  94. inline int Rank(int x)
  95. {
  96. node *p=root;
  97. int ret=;
  98. while(p!=null)
  99. if(p->key>=x)
  100. p=p->ch[];
  101. else
  102. ret+=p->ch[]->size+p->ex,p=p->ch[];
  103. return ret;
  104. }
  105. inline void Insert(int x)
  106. {
  107. node **p=insert(root,x);
  108. if(*p!=null)rebuild(*p);
  109. }
  110. inline void Erace_kth(int k)
  111. {
  112. erace(root,k);
  113. if(root->size<root->cover*a)rebuild(root);
  114. }
  115. inline void Erace(int x)
  116. {
  117. Erace_kth(Rank(x));
  118. }
  119. int main()
  120. {
  121. freopen("phs.in","r",stdin);
  122. freopen("phs.out","w",stdout);
  123. Init();
  124. int Q,opt,x;
  125. scanf("%d",&Q);
  126. while(Q--)
  127. {
  128. scanf("%d%d",&opt,&x);
  129. switch(opt)
  130. {
  131. case :Insert(x);break;
  132. case :Erace(x);break;
  133. case :printf("%d\n",Rank(x));break;
  134. case :printf("%d\n",Kth(x));break;
  135. case :printf("%d\n",Kth(Rank(x)-));break;
  136. case :printf("%d\n",Kth(Rank(x+)));break;
  137. }
  138. }
  139. }

ScapeGoat——Tree

打了四种平衡树,发现01Trie最快还™短..........

  1. #include <cstdio>
  2. using namespace std;
  3. const int A=,fix=;
  4. inline void read (int &now){
  5. register char word=getchar();bool temp=false;
  6. for(now=;word<''||word>'';word=getchar())if(word=='-')temp=true;
  7. for(;word>=''&&word<='';now=(now<<)+(now<<)+word-'',word=getchar());
  8. if(temp)now=-now;
  9. }
  10. struct Trie{
  11. Trie *ch[];int size;
  12. void* operator new(size_t);
  13. }*root,*null,*C,*mempool;
  14. void* Trie :: operator new(size_t){
  15. if(C==mempool)C=new Trie[(<<)+],mempool=C+(<<)+;
  16. return C++;
  17. }
  18. inline Trie *New(){
  19. register Trie *p=new Trie;
  20. p->ch[]=p->ch[]=null,p->size=;
  21. return p;
  22. }
  23. int n;
  24. inline void Insert(int x,int size){
  25. register Trie *p=root;x+=fix;
  26. for(int i=A;i>=;i--){
  27. if(p->ch[(x>>i)&]==null)p->ch[(x>>i)&]=New();
  28. p=p->ch[(x>>i)&];p->size+=size;
  29. }
  30. }
  31. inline int get_Rank(int x){
  32. register int ret=;x+=fix;register Trie *p=root;
  33. for(register int i=A;i>=&&p!=null;i--)
  34. if(x&(<<i))ret+=p->ch[]->size,p=p->ch[];
  35. else p=p->ch[];
  36. return ret;
  37. }
  38. inline int get_Kth(int k){
  39. register Trie *p=root;register int ret=;
  40. for(register int i=A;i>=;i--)
  41. if(p->ch[]->size>=k)p=p->ch[];
  42. else ret|=(<<i),k-=p->ch[]->size,p=p->ch[];
  43. return ret-fix;
  44. }
  45. int main(){
  46. freopen("phs.in","r",stdin);freopen("phs.out","w",stdout);
  47. null=new Trie,null->ch[]=null->ch[]=null,null->size=,root=new Trie,root->ch[]=root->ch[]=null,root->size=;
  48. read(n);register int opt,x;
  49. while(n--){
  50. read(opt),read(x);
  51. switch(opt){
  52. case :Insert(x,);break;
  53. case :Insert(x,-);break;
  54. case :printf("%d\n",get_Rank(x)+);break;
  55. case :printf("%d\n",get_Kth(x));break;
  56. case :printf("%d\n",get_Kth(get_Rank(x)));break;
  57. case :printf("%d\n",get_Kth(get_Rank(x+)+));break;
  58. }
  59. }
  60. }

01Trie

【bzoj3224】Tyvj 1728 普通平衡树 01Trie姿势+平衡树的四种姿势 :splay,旋转Treap,非旋转Treap,替罪羊树的更多相关文章

  1. [BZOJ3224]Tyvj 1728 普通平衡树

    [BZOJ3224]Tyvj 1728 普通平衡树 试题描述 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:1. 插入x数2. 删除x数(若有多个相同的数,因只删除一个) ...

  2. bzoj3224: Tyvj 1728 普通平衡树(平衡树)

    bzoj3224: Tyvj 1728 普通平衡树(平衡树) 总结 a. cout<<(x=3)<<endl;这句话输出的值是3,那么对应的,在splay操作中,当父亲不为0的 ...

  3. 平衡树及笛卡尔树讲解(旋转treap,非旋转treap,splay,替罪羊树及可持久化)

    在刷了许多道平衡树的题之后,对平衡树有了较为深入的理解,在这里和大家分享一下,希望对大家学习平衡树能有帮助. 平衡树有好多种,比如treap,splay,红黑树,STL中的set.在这里只介绍几种常用 ...

  4. SpringBoot系列教程web篇Servlet 注册的四种姿势

    原文: 191122-SpringBoot系列教程web篇Servlet 注册的四种姿势 前面介绍了 java web 三要素中 filter 的使用指南与常见的易错事项,接下来我们来看一下 Serv ...

  5. bzoj3224 Tyvj 1728 普通平衡树(名次树+处理相同)

    3224: Tyvj 1728 普通平衡树 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 5354  Solved: 2196[Submit][Sta ...

  6. bzoj3224: Tyvj 1728 普通平衡树(splay)

    3224: Tyvj 1728 普通平衡树 题目:传送门 题解: 啦啦啦啦又来敲个模版水经验啦~ 代码: #include<cstdio> #include<cstring> ...

  7. 绝对是全网最好的Splay 入门详解——洛谷P3369&BZOJ3224: Tyvj 1728 普通平衡树 包教包会

    平衡树是什么东西想必我就不用说太多了吧. 百度百科: 一个月之前的某天晚上,yuli巨佬为我们初步讲解了Splay,当时接触到了平衡树里的旋转等各种骚操作,感觉非常厉害.而第二天我调Splay的模板竟 ...

  8. Bzoj3224 / Tyvj 1728 普通替罪羊树

    Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 12015  Solved: 5136 Description 您需要写一种数据结构(可参考题目标题), ...

  9. [BZOJ3224] [Tyvj 1728] 普通平衡树 (treap)

    Description 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 1. 插入x数 2. 删除x数(若有多个相同的数,因只删除一个) 3. 查询x数的排名(若有多个相 ...

随机推荐

  1. POJ2553 汇点个数(强连通分量

    The Bottom of a Graph Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 12070   Accepted: ...

  2. CentOs安装Mysql和配置初始密码

    mysql官网yum安装教程,地址:https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/#repo-qg-yum-fresh-install ...

  3. Kubernetes-Service Account

    kube-apiserver 配置文件:/etc/kubernetes/apiserver KUBE_API_ADDRESS="--insecure-bind-address=0.0.0.0 ...

  4. .Net 面试题 汇总(二)

    51..net中读写XML的类都归属于哪些命名空间? 答:System.Xml 52.解释一下UDDI.WSDL的意义及其作用. 答:UDDI即统一描述.发现和集成协议.作用: 用来说明一个Web服务 ...

  5. 初步学习pg_control文件之十三

    接前文,初步学习pg_control文件之十二 看这个: * backupStartPoint is the redo pointer of the backup start checkpoint, ...

  6. LeetCode:27. Remove Element(Easy)

    1. 原题链接 https://leetcode.com/problems/remove-element/description/ 2. 题目要求 给定一个整数数组 nums[ ] 和一个整数 val ...

  7. Python的异常

    一.异常的常用形式 异常即是一个事件,该事件会在程序执行过程中发生,影响了程序的正常执行.一般情况下,在Python无法正常处理程序时就会发生一个异常.异常是Python对象,表示一个错误.当Pyth ...

  8. MyEclipse - 问题集 - 创建Maven项目,JDK版本默认是1.5

    修改Maven的配置文件settings.xml,增加profile节点,如下所示: <profile> <id>jdk-1.8</id> <activati ...

  9. thrift服务端到客户端开发简单示例

    (1)首先我们在服务器端写个helloworld.thrift文件,如下所示: service HelloWorld{ string ping(1: string name), string getp ...

  10. jdk带的一些工具,强悍

    这些工具有的已经接触到了,功能很强悍,但是使用也有点复杂(参数) 在代码中使用System.setProperty()或者在启动程序时使用-D选项设置代理服务器地址和端口 看看别人的研究: JDK自带 ...