经过测试,TimeMS15MemoryK172Length806LanguageVC编译器运行通过,不知道它为什么提示WrongAnswer#includeusingnamespacestd;voidsortint*seq,intm//冒泡排序{int*p;inttemp,i;fori=m;i>=2;i--{forp=seq;p*p+1{temp=*p;*p=*p+1;*p+1=temp;}}}}voidmain{intm,n;int**a;int*flag;int*p,**pp;whilecin>>n{a=int**callocn,sizeofint*;flag=int*callocn,sizeofint;forpp=a;pp>m;*pp=int*callocm,sizeofint;memset*pp,0,m;forp=*pp;p>*p;}sort*pp,m;forp=*pp+1;p<*pp+m-1;p++{if*p+*p!=*p-1+*p+1{p=*pp+m;break;}}ifp==*pp+m{*flag+pp-a=0;}else{*flag+pp-a=1;}}forp=flag;p
赵飞雄2019-11-03 16:18:59