当前位置:主页 > mobile.365777.com >

请检查此问题是否有任何问题(查看C ++和模板问题,家长们)

时间:2019-08-10 08:06   mobile.365777.com  

请检查此问题是否有任何问题(查看C ++和模板问题,家长们)
#Includeiostream #includecstdiousingnamespacestd; intf[10001]; intfind(into){if(f[o]!
= o)f[o]= find(f[o]); returnf[o];}voidhh(intl,intp){f[p]= l;}intmain(){intm,n,k,x,ycin
#Includeiostream #includecstdiousingnamespacestd; intf[10001]; intfind(into){if(f[o]!
= o)f[o]= find(f[o]); returnf[o];}voidhh(intl,intp){f[p]= l;}intmain(){intm,n,k,x,y; cinnfor(inti = 1; ii ++)f[i]= i; for(inti = 1; ii ++){cinxinta = find(x); intb = find(y); if(a!)
= b)hh(a,b);}cinfor(inti = 1; ii ++){cinxif(find(x)== find(y))coutYesendl; elsecoutNoendl;}}
发展