我的线段树简直有毒,各种错误都能忙上半天。做了kuangbin的线段树专题的一半,还有一半留到以后去做。

  链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=66989#overview

  总结一下题目吧:

  A和B都是最简单的线段树,也没有成段更新。A就是维护一段区间的和,B题就是维护一段区间的最大值。这两题直接给出代码,当做一个模板吧。

  A:

 #include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
#define t_mid (l+r >> 1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r const int N = +;
int a[N];
int c[N<<]; void up(int o) {c[o]=c[ls]+c[rs];}
int build(int o,int l,int r)
{
if(l==r) return c[o]=a[l];
return c[o] = build(lson) + build(rson);
}
void update(int o,int l,int r,int pos,int dt)
{
if(l==r)
{
c[o]+=dt;
return;
}
if(pos <= t_mid) update(lson,pos,dt);
if(pos > t_mid) update(rson,pos,dt);
up(o);
}
int query(int o,int l,int r,int ql,int qr)
{
if(ql == l && qr == r) return c[o];
int res = ;
if(qr<=t_mid) res+=query(lson,ql,qr);
else if(ql>t_mid) res+=query(rson,ql,qr);
else
{
res+=query(lson,ql,t_mid);
res+=query(rson,t_mid+,qr);
}
//if(ql <= t_mid) res += query(lson,ql,qr);
//if(qr > t_mid) res += query(rson,ql,qr);
/*
注释掉的地方是另外一种写法,只要把第一行改成
if(ql <= l && qr >= r) reutrn c[o];
即可
*/
return res;
} int main()
{
int T;
scanf("%d",&T);
for(int kase=;kase<=T;kase++)
{
printf("Case %d:\n",kase);
int n;
scanf("%d",&n);
for(int i=;i<=n;i++) scanf("%d",a+i);
build(,,n); char s[];
while(scanf("%s",s)== && strcmp(s,"End"))
{
int x,y;
scanf("%d%d",&x,&y);
if(!strcmp(s,"Add")) update(,,n,x,y);
else if(!strcmp(s,"Sub")) update(,,n,x,-y);
else if(!strcmp(s,"Query")) printf("%d\n",query(,,n,x,y));
}
}
}

  B:

 #include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
#define t_mid (l+r >> 1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r const int N = +;
int a[N];
int c[N<<]; void up(int o) {c[o]=max(c[ls],c[rs]);}
int build(int o,int l,int r)
{
if(l==r) return c[o]=a[l];
return c[o] = max(build(lson),build(rson));
}
void update(int o,int l,int r,int pos,int dt)
{
if(l==r)
{
c[o]=dt;
return;
}
if(pos <= t_mid) update(lson,pos,dt);
if(pos > t_mid) update(rson,pos,dt);
up(o);
}
int query(int o,int l,int r,int ql,int qr)
{
if(ql <= l && qr >= r) return c[o];
int r1=,r2=;
if(ql <= t_mid) r1 = query(lson,ql,qr);
if(qr > t_mid) r2 = query(rson,ql,qr);
return max(r1,r2);
} int main()
{
int n,m;
while(scanf("%d%d",&n,&m)==)
{
for(int i=;i<=n;i++) scanf("%d",a+i);
build(,,n); while(m--)
{
char s[];
scanf("%s",s);
int x,y;
scanf("%d%d",&x,&y);
if(!strcmp(s,"U")) update(,,n,x,y);
else if(!strcmp(s,"Q")) printf("%d\n",query(,,n,x,y));
}
}
}

  然后看一下F题,要求维护的是区间内最大的和最小的差值,那么其实维护的就是区间的最小值和最大值。然后在所需区间相减即可。

  具体见代码:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std; const int N = + ; struct node
{
int a,b;
}c[N<<];
int h[N]; node get(node a,node b)
{
node ans;
ans.a = max(a.a,b.a);
ans.b = min(a.b,b.b);
return ans;
} node build(int o,int l,int r)
{
if(l==r) return c[o]=(node){h[l],h[l]};
node a = build(lson);
node b = build(rson);
return c[o] = get(a,b);
} node query(int o,int l,int r,int ql,int qr)
{
if(l==ql && r==qr)
{
return c[o];
} node res;
if(qr <= t_mid) res=query(lson,ql,qr);
else if(ql > t_mid) res=query(rson,ql,qr);
else
{
res=get(query(lson,ql,t_mid),query(rson,t_mid+,qr));
}
return res;
} int main()
{
int n,m;
while(scanf("%d%d",&n,&m)==)
{ for(int i=;i<=n;i++) scanf("%d",h+i);
build(,,n); while(m--)
{
int x,y;
scanf("%d%d",&x,&y);
node ans = query(,,n,x,y);
printf("%d\n",ans.a-ans.b);
}
}
}

  然后就是成段更新的问题了,C和E。要注意的是add数组(或者叫做懒惰标记要清空一下)。

  这里就给出C题代码:

 #include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
#define t_mid (l+r >> 1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
typedef long long ll; const int N = +;
ll a[N];
ll c[N<<],add[N<<]; void up(int o) {c[o] = c[ls] + c[rs];}
void down(int o,int len)
{
if(add[o])
{
add[ls] += add[o];
add[rs] += add[o];
c[ls] += add[o] * (len - (len >> ) );
c[rs] += add[o] * (len >> );
add[o]=;
}
}
ll build(int o,int l,int r)
{
if(l==r) return c[o]=a[l];
return c[o] = build(lson) + build(rson);
}
void update(int o,int l,int r,int ql,int qr,ll dt)
{
if(ql == l && qr == r)
{
add[o] += dt;
c[o] += dt * (r-l+);
return;
}
down(o,r-l+);
if(qr <= t_mid) update(lson,ql,qr,dt);
else if(ql>t_mid) update(rson,ql,qr,dt);
else
{
update(lson,ql,t_mid,dt);
update(rson,t_mid+,qr,dt);
}
up(o);
}
ll query(int o,int l,int r,int ql,int qr)
{
if(ql == l && qr == r) return c[o];
down(o,r-l+);
ll res = ;
if(qr <= t_mid) res+=query(lson,ql,qr);
else if(ql>t_mid) res+=query(rson,ql,qr);
else
{
res+=query(lson,ql,t_mid);
res+=query(rson,t_mid+,qr);
}
return res;
}
void init()
{
memset(add,,sizeof(add));
} int main()
{
int n,m;
while(scanf("%d%d",&n,&m)==)
{
init(); for(int i=;i<=n;i++) scanf("%I64d",a+i);
build(,,n); while(m--)
{
char s[];
scanf("%s",s);
if(s[]=='C')
{
int x,y;
ll dt;
scanf("%d%d%I64d",&x,&y,&dt);
update(,,n,x,y,dt);
}
else
{
int x,y;
scanf("%d%d",&x,&y);
printf("%I64d\n",query(,,n,x,y));
}
}
}
}

  接着其他几题都是比较零散的问题,先看D。这是一个离散化的问题,因为有些区间过长所以离散化成小区间,然后再用线段树,注意这里有个离散技巧,在离散化以后,如果两点间距离相差大于1,就把小的一点+1的值也作为离散后的点这样可以有效的防止有些区间被漏过去,比方说先涂色1-10,再1-4,最后6-10,这样的话如果不这么处理5这个区间就被盖过去了。其实现在讲起来还是有点迷糊,就先这样吧,以后再看。还要注意的是一个地方unique去重的话返回的是最后一个不重复元素的下一个地址,因此要求不重复元素的个数的话要减去的是第一个元素的下标就好了。

  具体见代码吧:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <vector>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std; const int N = + ; int c[N<<];
bool vis[N];
int arr[N<<];
int pl[N],pr[N];
int ans=; void pushDown(int o)
{
if(c[o]!=-)
{
c[ls]=c[rs]=c[o];
c[o]=-;
}
}
void update(int o,int l,int r,int ql,int qr,int dt)
{
if(ql == l && qr == r)
{
c[o] = dt;
return;
}
pushDown(o);
if(qr <= t_mid) update(lson,ql,qr,dt);
else if(ql > t_mid) update(rson,ql,qr,dt);
else
{
update(lson,ql,t_mid,dt);
update(rson,t_mid+,qr,dt);
}
}
void query(int o,int l,int r)
{
if(c[o]!=-)
{
if(!vis[c[o]])
{
vis[c[o]]=;
ans++;
}
return;
}
if(l==r) return;
query(lson);
query(rson);
} int main()
{
int T;
scanf("%d",&T);
while(T--)
{
int n;
scanf("%d",&n);
memset(vis,,sizeof(vis));
memset(c,-,sizeof(c)); int sit=;
for(int i=;i<=n;i++)
{
scanf("%d%d",&pl[i],&pr[i]);
arr[++sit] = pl[i];
arr[++sit] = pr[i];
}
sort(arr+,arr++sit);
int num = unique(arr+,arr++sit)-(arr+); for(int i=num;i>=;i--)
{
if(arr[i]-arr[i-] > ) arr[++num] = arr[i-] + ;
}
sort(arr+,arr++num); for(int i=;i<=n;i++)
{
int l = lower_bound(arr+,arr++num,pl[i])-arr;
int r = lower_bound(arr+,arr++num,pr[i])-arr;
update(,,num,l,r,i);
} ans=;
query(,,num);
printf("%d\n",ans);
}
}

  G题是对一个区间每次都开根号的进行操作,思路是就算是一个long long的整数,开8次根号也就变成1了,那么对于都是1的区间就不需要递归了,但是这题也不知道为什么无限WA,留着以后再看。另外这题有毒的一个地方在于,每次给出的区间不一定是后面的大于前面的!。。

  代码如下:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <math.h>
#include <vector>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std;
typedef long long ll; const int N = + ; ll c[N<<];
ll a[N]; int build(int o,int l,int r)
{
if(l==r) return c[o]=a[l];
return c[o] = build(lson) + build(rson);
}
void pushup(int o) {c[o]=c[ls]+c[rs];}
void update(int o,int l,int r,int ql,int qr)
{
if(l==ql && r==qr && (ll)(r-l+) == c[o])
{
return;
}
else if(l==r) {c[o] = (ll)(sqrt((double)c[o]));return;} if(qr <= t_mid) update(lson,ql,qr);
else if(ql > t_mid) update(rson,ql,qr);
else
{
update(lson,ql,t_mid);
update(rson,t_mid+,qr);
}
pushup(o);
}
ll query(int o,int l,int r,int ql,int qr)
{
if(l==ql && r==qr)
{
return c[o];
} ll res=;
if(qr <= t_mid) res=query(lson,ql,qr);
else if(ql > t_mid) res=query(rson,ql,qr);
else
{
res = query(lson,ql,t_mid) + query(rson,t_mid+,qr);
}
return res;
} int main()
{
int n,m;
int cnt=;
while(scanf("%d",&n)==)
{
printf("Case #%d:\n",cnt++);
for(int i=;i<=n;i++) scanf("%I64d",a+i);
build(,,n); scanf("%d",&m);
while(m--)
{
int x,y,z;
scanf("%d%d%d",&z,&x,&y);
if(z==) update(,,n,min(x,y),max(x,y));
else printf("%I64d\n",query(,,n,min(x,y),max(x,y)));
}
puts("");
}
}

  H题是一个很奥义的题,题目意思是每次可以拆村庄或者恢复最后一个被破坏的村庄,询问的话就是询问村庄x附近最多有多少个连续的村庄。解释一下代码里面的数组的含义吧:lsum的意思是这个区间里面从最左边开始有多少个连续的村庄,rsum是从右边开始,msum是在这个区间里面最多有多少个连续的村庄。明白了这些以后代码就可以看懂了。具体见代码:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <math.h>
#include <vector>
#include <stack>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std;
typedef long long ll;
const int N = + ; stack<int> S;
int lsum[N<<],rsum[N<<],msum[N<<],c[N<<]; void build(int o,int l,int r)
{
lsum[o]=rsum[o]=msum[o]=r-l+;
if(l==r) return;
build(lson);
build(rson);
}
int query(int o,int l,int r,int ind)
{
if(l==r || msum[o]== || msum[o]==r-l+) return msum[o];
if(ind <= t_mid)
{
if(ind >= t_mid-rsum[ls]+)
{
return query(lson,ind) + query(rson,t_mid+); //t_mid+1查右边第一点的连续情况
}
else
{
return query(lson,ind);
}
}
else
{
if(ind <= t_mid+lsum[rs])
{
return query(lson,t_mid) + query(rson,ind); //t_mid查左边第一点的连续情况
}
else
{
return query(rson,ind);
}
}
}
void update(int o,int l,int r,int ind,int f)
{
if(l==r)
{
lsum[o]=rsum[o]=msum[o]=f;
return;
} if(ind <= t_mid) update(lson,ind,f);
else update(rson,ind,f); if(t_mid - l + == lsum[ls]) lsum[o] = lsum[ls] + lsum[rs];
else lsum[o] = lsum[ls];
if(r - t_mid == rsum[rs]) rsum[o] = rsum[rs] + rsum[ls];
else rsum[o] = rsum[rs]; msum[o] = max(max(msum[ls],msum[rs]),rsum[ls]+lsum[rs]);
} int main()
{
int n,m;
while(scanf("%d%d",&n,&m)==)
{
while(!S.empty()) S.pop();
build(,,n); while(m--)
{
char s[];
scanf("%s",s);
if(s[] == 'R')
{
int x = S.top();S.pop();
update(,,n,x,);
}
else
{
int x;
scanf("%d",&x);
if(s[] == 'D')
{
update(,,n,x,);
S.push(x);
}
else
{
printf("%d\n",query(,,n,x));
}
}
}
}
}

  I题是用dfs序号维护的线段树,比较有意思。题意是给一个有向图,每次对x点涂色,该点和其下面的点都会被涂色,然后查询时查询某点的颜色。思路就是先得出dfs序,然后如果更新某点的颜色,就update这点的区间为该点的起始时间和终了之间,因为在这个时间内访问的节点恰恰为这点和他的子节点。同时,要查询颜色的话就是把这点的起始时间当做节点号访问就行。具体见代码:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <math.h>
#include <vector>
#include <stack>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std;
typedef long long ll;
const int N = + ; vector<int> G[N];
int n,dfs_clock,st[N],ed[N],add[N<<],c[N<<];
bool use[N]; void init()
{
dfs_clock=;
for(int i=;i<=n;i++) G[i].clear();
memset(st,,sizeof(st));
memset(ed,,sizeof(ed));
memset(use,,sizeof(use));
}
void build(int o,int l,int r)
{
c[o]=add[o]=-;
if(l==r) return;
build(lson);
build(rson);
}
void pushdown(int o)
{
if(add[o] != -)
{
add[ls]=add[rs]=add[o];
c[ls]=c[rs]=add[o];
add[o]=-;
}
}
void dfs(int u)
{
st[u]=++dfs_clock;
for(int i=;i<G[u].size();i++)
{
int v = G[u][i];
dfs(v);
}
ed[u]=dfs_clock;
}
void update(int o,int l,int r,int ql,int qr,int f)
{
if(ql <= l && qr >= r)
{
c[o] = f;
add[o] = f;
return;
}
pushdown(o);
if(ql <= t_mid) update(lson,ql,qr,f);
if(qr > t_mid) update(rson,ql,qr,f);
}
int query(int o,int l,int r,int ind)
{
if(l==r) return c[o];
pushdown(o);
if(ind <= t_mid) return query(lson,ind);
else return query(rson,ind);
} int main()
{
int T,m;
scanf("%d",&T);
for(int kase=;kase<=T;kase++)
{
printf("Case #%d:\n",kase);
init(); scanf("%d",&n);
for(int i=;i<n;i++)
{
int u,v;
scanf("%d%d",&u,&v);
G[v].push_back(u);
use[u]=;
}
for(int i=;i<=n;i++) if(!use[i]) dfs(i);
build(,,n); char s[];
scanf("%d",&m);
while(m--)
{
scanf("%s",s);
if(s[] == 'C')
{
int x;
scanf("%d",&x);
printf("%d\n",query(,,n,st[x]));
}
else
{
int x,y;
scanf("%d%d",&x,&y);
update(,,n,st[x],ed[x],y);
}
}
}
return ;
}

  J题题意很简单,就是区间操作还有乘法。那么思路就是,用变量记录一段区间值是不是相等,相等的话只要记录下这次操作变化了多少就可以,不相等就递归下去,不过这题细节也挺多的,反正无限WA,留着以后再看。这题真是有毒!。。代码如下:

 #include <stdio.h>
#include <algorithm>
#include <set>
#include <math.h>
#include <vector>
#include <stack>
#include <map>
#include <string.h>
#define t_mid (l+r>>1)
#define ls (o<<1)
#define rs (o<<1 | 1)
#define lson ls,l,t_mid
#define rson rs,t_mid+1,r
using namespace std;
typedef long long ll;
const int N = + ;
const int mod = ; ll add[N<<],mul[N<<],ch[N<<],c[N<<]; //ch表示这一段是否都是一个值,c表示这一段都是这一个数 void build(int o,int l,int r)
{
mul[o]=;
add[o]=c[o]=ch[o]=; //我觉得这里的ch[o]应该等于1,但是AC代码是0,而且答案都一样。
if(l==r)
{
ch[o]=;
return;
}
build(lson);
build(rson);
} void pushdown(int o,int l,int r)
{
if(l==r) return;
if(ch[o])
{
add[ls]=,mul[ls]=;
add[rs]=,mul[rs]=;
ch[ls]=ch[rs]=;
c[ls]=c[rs]=c[o];
ch[o]=;
}
else
{
if(add[o])
{
if(ch[ls]) c[ls] = (c[ls]+add[o]) % mod;
else
{
pushdown(lson);
add[ls]=(add[o]+add[ls]) % mod;
} if(ch[rs]) c[rs] = (c[rs]+add[o]) % mod;
else
{
pushdown(rson);
add[rs]=(add[o]+add[rs]) % mod;
}
add[o]=;
} if(mul[o]>)
{
if(ch[ls]) c[ls]=(c[ls]*mul[o]) % mod;
else
{
pushdown(lson);
mul[ls]=(mul[o]*mul[ls]) % mod;
} if(ch[rs]) c[rs]=(c[rs]*mul[o]) % mod;
else
{
pushdown(rson);
mul[rs]=(mul[o]*mul[rs]) % mod;
}
mul[o]=;
}
}
} void update(int o,int l,int r,int ql,int qr,int f,int op)
{
if(ql <= l && qr >= r)
{
if(op == )
{
ch[o]=,c[o]=f;
mul[o]=,add[o]=;
}
else
{
if(ch[o])
{
if(op == ) c[o]=(c[o]+f)%mod;
else c[o]=c[o]*f%mod;
}
else
{
pushdown(o,l,r);
if(op == ) add[o]=(c[o]+f)%mod;
else mul[o]=mul[o]*f%mod;
}
}
return;
} pushdown(o,l,r);
if(ql <= t_mid) update(lson,ql,qr,f,op);
if(qr > t_mid) update(rson,ql,qr,f,op);
} ll query(int o,int l,int r,int ql,int qr,int p)
{
if(ql <= l && qr >= r)
{
if(ch[o])
{
ll ans = ,t=c[o];
for(int i=;i<=p;i++) ans = ans * t % mod;
return (r-l+) * ans % mod;
}
} pushdown(o,l,r);
ll ans = ;
if(ql <= t_mid) ans += query(lson,ql,qr,p);
if(qr > t_mid) ans += query(rson,ql,qr,p);
return ans % mod;
}
int main()
{
int n,m;
while(scanf("%d%d",&n,&m)==)
{
if(n== && m==) break;
build(,,n);
while(m--)
{
int op,x,y,f;
scanf("%d%d%d%d",&op,&x,&y,&f);
if(op<=) update(,,n,x,y,f,op);
else printf("%I64d\n",query(,,n,x,y,f));
}
}
return ;
}

  哎,线段树真的好烦!。。

ACM之路(14)—— 线段树的日常(上)的更多相关文章

  1. ACM: Billboard 解题报告-线段树

     Billboard Time Limit:8000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Descript ...

  2. UPC 2224 Boring Counting ★(山东省第四届ACM程序设计竞赛 tag:线段树)

    [题意]给定一个长度为N的数列,M个询问区间[L,R]内大于等于A小于等于B的数的个数. [题目链接]http://acm.upc.edu.cn/problem.php?id=2224 省赛的时候脑抽 ...

  3. ACM/ICPC 之 数据结构-线段树+区间离散化(POJ2528)

    这道题用线段树做更方便更新和查询,但是其数据范围很大,因此要将离散化和线段树结合起来,算是一道比较经典的线段树+离散化的例题. 线段树的离散化有很多方法,在这里,我先用一次结点离散化,间接将源左右端点 ...

  4. ACM/ICPC 之 数据结构-线段树思想(POJ2182,含O(n^2)插入式解法)

    这道题在一定程度上体现了线段树的一种用法,解决的问题是:对于总计n个元素的第i个元素,已知其在[1,i]上部分序列的排名,求第i个元素在所有n个元素中的排名. 当然这道题数据比较水,所以用O(n^2) ...

  5. ACM: Hotel 解题报告 - 线段树-区间合并

    Hotel Time Limit:3000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Description The ...

  6. sdut 2159 Ivan comes again!(2010年山东省第一届ACM大学生程序设计竞赛) 线段树+离散

    先看看上一个题: 题目大意是: 矩阵中有N个被标记的元素,然后针对每一个被标记的元素e(x,y),你要在所有被标记的元素中找到一个元素E(X,Y),使得X>x并且Y>y,如果存在多个满足条 ...

  7. 杭电 HDU ACM 2795 Billboard(线段树伪装版)

    Billboard Time Limit: 20000/8000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  8. 另一个ACM之路建议

    ACM联系建议 一位高手对我的建议: 一般要做到50行以内的程序不用调试.100行以内的二分钟内调试成功.acm主要是考算法的 ,主要时间是花在思考算法上,不是花在写程序与debug上. 下面给个计划 ...

  9. 线段树 Interval Tree

    一.线段树 线段树既是线段也是树,并且是一棵二叉树,每个结点是一条线段,每条线段的左右儿子线段分别是该线段的左半和右半区间,递归定义之后就是一棵线段树. 例题:给定N条线段,{[2, 5], [4, ...

随机推荐

  1. 怎样获取当前文档所有的元素节点(即html标签节点)

    方法1. 使用 document.getElementsByTagName("*"); 方法2. 使用document.querySelectorAll("*" ...

  2. java Lesson08总结

    package com.xt.java.FirstExciple.oop; public class NokiaPhone {  //成员变量 String name="np001" ...

  3. Log4net采用外部配置文件和多记录器的方法

    1) 创建配置文件,可以放在任意位置,名字可以任意的xml文件 例如,文件名 Log.Config.xml,内容如下 <?xml version="1.0" encoding ...

  4. lua堆栈

    lua堆栈 来源 https://blog.csdn.net/suhuaiqiang_janlay/article/details/56702381 来源 https://blog.csdn.net/ ...

  5. LeetCode 腾讯精选50题--合并K个排序链表

    今天的题目稍微有点复杂了,因为是K个有序链表的合并,看到这道题后的大体思路是这样的: 1.首先先做到两个链表的合并,链表的合并我想到的是用递归操作, 2.其次是多个链表的合并,所以在第一步实现的基础上 ...

  6. 单变量图形的pandas方法

    数据加载与展示: 1. 类别数据的Bar图 1.1 每一类对应有多少个 1.2 每类数量占整体的比值 1.3 对X轴进行排序

  7. vue父组件传值和子组件触发父组件方法

    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.js"></script> <scr ...

  8. OpenCV入门学习资料汇总

    OpenCV学习文档资料 OpenCV学习:1)OpenCV中文网站——http://wiki.opencv.org.cn/index.php/%E9%A6%96%E9%A1%B5 2)python实 ...

  9. Delphi Tobject类

  10. MySQL8.0.17下载与安装

    下载环境:Windows 10 下载地址: https://dev.mysql.com/downloads/mysql/ 1.解压压缩包,修改解压目录. 2.在E:\mysql-8.0.17-winx ...