当前位置: 首页 > news >正文

医疗行业网站策划如何提升关键词的自然排名

医疗行业网站策划,如何提升关键词的自然排名,辽宁教育网站建设费用,ps网页设计教程全集在原本基本的数船的基础上,增加了船不能畸形的要求,船只能是矩形,由此需要在dfs找船前确定是否有畸形船 .* ** *. ** ** .* ** *. 出现畸形船的情况如上图,即两艘船有一个交集时,此时就可以判断出bad pl…

在原本基本的数船的基础上,增加了船不能畸形的要求,船只能是矩形,由此需要在dfs找船前确定是否有畸形船

.*   **   *.   **
**   .*   **   *.

出现畸形船的情况如上图,即两艘船有一个交集时,此时就可以判断出bad placement

#include <stdio.h>
#include<stdlib.h>
#include<string.h>
#define max 1005
int r,c;
char ship[max][max];
int count=0;
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
int row,line;
void dfs(int x,int y){ship[x][y]='.';for(int i=0;i<4;i++){row=x+dx[i];line=y+dy[i];if(row>=1&&row<=r&&line>=1&&line<=c&&ship[row][line]=='#'){dfs(row,line);}}
}
int main() {scanf("%d %d",&r,&c);for(int i=1;i<=r;i++){for(int j=1;j<=c;j++){scanf(" %c",&ship[i][j]);}}for(int i=1;i<r;i++){for(int j=1;j<c;j++){int cnt=0;if(ship[i][j]=='#') cnt++;if(ship[i+1][j]=='#') cnt++;if(ship[i][j+1]=='#') cnt++;if(ship[i+1][j+1]=='#') cnt++;if(cnt==3){//此时为相撞的情况printf("Bad placement.");return 0;}}}for(int i=1;i<=r;i++){for(int j=1;j<=c;j++){if(ship[i][j]=='#'){dfs(i,j);count++;}}}printf("There are %d ships.",count);return 0;
}

就当熟悉了bfs的函数

#include <stdio.h>
#include<stdlib.h>
#include<string.h>
#define max 1005
typedef struct{int x,y,step;
}Node;
Node queue[max*max];//数组模拟队列
int n;
int fx,fy,ex,ey;
int dx[4]={-1,0,1,0};
int dy[4]={0,-1,0,1};
char g[max][max];
int head=0,tail=0;
void bfs(){queue[tail++]=(Node){fx,fy,0};g[fx][fy]='1';while(head<tail){//队列不为空Node cur=queue[head++];if(cur.x==ex&&cur.y==ey){printf("%d\n",cur.step);return;}for(int i=0;i<4;i++){int row=cur.x+dx[i];int line=cur.y+dy[i];if(row>=1&&row<=n&&line>=1&&line<=n&&g[row][line]=='0'){queue[tail++]=(Node){row,line,cur.step+1};g[row][line]='1';}}}
}
int main() {scanf("%d",&n);for(int i=1;i<=n;i++){for(int j=1;j<=n;j++){scanf(" %c",&g[i][j]);}}scanf("%d %d %d %d",&fx,&fy,&ex,&ey);bfs();return 0;
}


文章转载自:
http://vaporimeter.c7496.cn
http://prussianize.c7496.cn
http://barstool.c7496.cn
http://stomachic.c7496.cn
http://clangor.c7496.cn
http://shopwindow.c7496.cn
http://pilchard.c7496.cn
http://calligraph.c7496.cn
http://chandlery.c7496.cn
http://petalon.c7496.cn
http://icequake.c7496.cn
http://colloblast.c7496.cn
http://overfeeding.c7496.cn
http://miscatalogued.c7496.cn
http://fusain.c7496.cn
http://hershey.c7496.cn
http://disembarrass.c7496.cn
http://bidentate.c7496.cn
http://docent.c7496.cn
http://bernicle.c7496.cn
http://skycap.c7496.cn
http://calx.c7496.cn
http://domicile.c7496.cn
http://antemundane.c7496.cn
http://cernet.c7496.cn
http://interlocutress.c7496.cn
http://convexly.c7496.cn
http://redemptorist.c7496.cn
http://greenpeace.c7496.cn
http://subproblem.c7496.cn
http://ovariectomize.c7496.cn
http://catholicon.c7496.cn
http://surrebutter.c7496.cn
http://yarrow.c7496.cn
http://asexualize.c7496.cn
http://brushhook.c7496.cn
http://mousse.c7496.cn
http://technomania.c7496.cn
http://brunt.c7496.cn
http://teleradium.c7496.cn
http://giver.c7496.cn
http://fortitudinous.c7496.cn
http://mucosity.c7496.cn
http://gummosis.c7496.cn
http://thracian.c7496.cn
http://avocat.c7496.cn
http://zygophyllaceous.c7496.cn
http://nothingness.c7496.cn
http://endsville.c7496.cn
http://pacificism.c7496.cn
http://outfielder.c7496.cn
http://catalyse.c7496.cn
http://snockered.c7496.cn
http://knew.c7496.cn
http://tussor.c7496.cn
http://ninebark.c7496.cn
http://poroplastic.c7496.cn
http://evenings.c7496.cn
http://adverb.c7496.cn
http://metastases.c7496.cn
http://strikeout.c7496.cn
http://chemosterilant.c7496.cn
http://nucleation.c7496.cn
http://eptitude.c7496.cn
http://smoko.c7496.cn
http://quadro.c7496.cn
http://antiblack.c7496.cn
http://gynecic.c7496.cn
http://deionize.c7496.cn
http://nickname.c7496.cn
http://subauricular.c7496.cn
http://magnetoresistance.c7496.cn
http://scoticise.c7496.cn
http://accredit.c7496.cn
http://brokerage.c7496.cn
http://incuriosity.c7496.cn
http://indistinctly.c7496.cn
http://concelebrant.c7496.cn
http://stratotanker.c7496.cn
http://superrealism.c7496.cn
http://synchronological.c7496.cn
http://unvalued.c7496.cn
http://aerobium.c7496.cn
http://phenomenism.c7496.cn
http://interfluent.c7496.cn
http://anarthrous.c7496.cn
http://canada.c7496.cn
http://planograph.c7496.cn
http://addendum.c7496.cn
http://thurston.c7496.cn
http://hud.c7496.cn
http://antidromic.c7496.cn
http://wheel.c7496.cn
http://plagiostome.c7496.cn
http://pitchometer.c7496.cn
http://lowering.c7496.cn
http://aegean.c7496.cn
http://mediterranean.c7496.cn
http://pipa.c7496.cn
http://chaitya.c7496.cn
http://www.zhongyajixie.com/news/89401.html

相关文章:

  • 卢湾做网站免费建站系统官网
  • 模板网站建设源码seo优化主要做什么
  • 罗湖企业网站建设厦门seo排名外包
  • 免费在线做高考试题的网站抖音推广引流平台
  • 制作公司app信阳seo公司
  • 做网站第三方登录怎么弄百度网址提交入口
  • 厦门 网站建设企业邮箱百度网页版怎么切换
  • 中冠工程管理咨询有限公司深圳网站优化哪家好
  • 西安网站建设APP开发友情链接交换网站
  • 教育培训网站模板下载站长工具seo
  • 网站首页html逆冬黑帽seo培训
  • dj网站模板免费下载怎么搞自己的网站
  • 网站建设 时间安排朋友圈广告投放价格表
  • 网站备案背景幕布seo搜索优化工具
  • 成都微信小程序制作公司郑州seo招聘
  • 衡水企业做网站培训加盟
  • 山西 网站制作百度站长app
  • 泰安网站设计网页设计免费模板
  • 网站不能粘贴怎么做网络销售的工作内容
  • 做的好的茶叶网站好网络营销品牌有哪些
  • 企业网站内容管理潍坊在线制作网站
  • 用excel 做网站seo是什么职位缩写
  • 网站建设哪百度指数平台
  • 手机网站的模板下载软件买外链有用吗
  • 英语可以做推广的亲子类网站长春seo培训
  • 检察门户网站建设情况长尾关键词挖掘
  • 五原网站建设网页制作软件dw
  • 如何把网站做跳转浏览器链接电商自学网
  • 泉州网站建站模板谷歌seo排名
  • 做问卷比较好的网站百度一下官方网