从品牌网站建设到网络营销策划,从策略到执行的一站式服务
vectorclockwisePrint(vector > mat, int n, int m) { vector ret; int i=0; int j=0; int startx=0; int starty=0; int endx=n-1; int endy=m-1; while(startx<=endx && starty<=endy){ if(endy==starty){ for(j=endy,i=startx;i<=endx;++i){ ret.push_back(mat[i][j]); } return ret; } if(endx==startx){ for(i=startx,j=starty;j<=endy;++j){ ret.push_back(mat[i][j]); } return ret; } for(i=startx,j=starty;j<=endy;++j){ ret.push_back(mat[i][j]); } for(j=endy,i=startx+1;i<=endx;++i){ ret.push_back(mat[i][j]); } for(i=endx,j=endy-1;j>=starty;--j){ ret.push_back(mat[i][j]); } for(j=starty,i=endx-1;i>startx;--i){ ret.push_back(mat[i][j]); } startx++; starty++; endx--; endy--; } return ret; }
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图