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

珠海做公司网站免费二级域名建站

珠海做公司网站,免费二级域名建站,湖南省建设厅建管处,淄博seo【解题思路】 每个哨所是一个顶点,哨所与哨所之间的通信线路为边,两哨所间通讯花费的时间为边的权值。记第一个哨所为顶点s,信息从第一个哨所传递到表示为顶点x的某哨所可能有多条路径,每条传送路径有一个花费的时间&…

【解题思路】
        每个哨所是一个顶点,哨所与哨所之间的通信线路为边,两哨所间通讯花费的时间为边的权值。记第一个哨所为顶点s,信息从第一个哨所传递到表示为顶点x的某哨所可能有多条路径,每条传送路径有一个花费的时间,自然要选择花费时间最少的传送方案,也就是图中从顶点s到顶点x的最短路径。
       从哨所s到哨所x的送信时间就是顶点s到顶点x的最短路径的长度。先求出顶点s到图中其他每个顶点的最短路径。
       要想完成整个送信过程,就要让所有其他哨所都接收到第一个哨所传出的信,完成整个送信过程的时间就是最晚收到信的哨所的收信时间,也就是顶点s到其它所有顶点的最短路径中路径长度最大值。
      该题n最大为100,可以选择使用Floyd算法,Dijkstra算法

【参考代码】

#include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
int f[102][102];
int n,m;
int main()
{memset(f,INF,sizeof(f));int x,y,z;cin>>n>>m;for(int i=1;i<=n;i++) f[i][i]=0;for(int i=1;i<=m;i++){cin>>x>>y>>z;f[x][y]=f[y][x]=z;}for(int k=1;k<=n;k++)for(int i=1;i<=n;i++)for(int j=1;j<=n;j++){if((i!=k)&&(j!=k)&&(i!=j)&&(f[i][k]+f[k][j]<f[i][j]))f[i][j]=f[i][k]+f[k][j];}int s=0;for(int i=1;i<=n;i++) {if(f[1][i]==INF) {cout<<-1;return 0;}if(s<f[1][i]) s=f[1][i];}cout<<s<<endl;return 0;
}


文章转载自:
http://dinncorecompute.tqpr.cn
http://dinncocommanding.tqpr.cn
http://dinncozamia.tqpr.cn
http://dinncoaccommodating.tqpr.cn
http://dinncolanguishment.tqpr.cn
http://dinncobalanced.tqpr.cn
http://dinncohotly.tqpr.cn
http://dinncohopcalite.tqpr.cn
http://dinncotanniferous.tqpr.cn
http://dinncocourthouse.tqpr.cn
http://dinncoreversely.tqpr.cn
http://dinncocooperage.tqpr.cn
http://dinncolilium.tqpr.cn
http://dinncoperadventure.tqpr.cn
http://dinncomeliorative.tqpr.cn
http://dinncosupererogatory.tqpr.cn
http://dinncocaprylic.tqpr.cn
http://dinncozamzummim.tqpr.cn
http://dinncokana.tqpr.cn
http://dinncodisproduct.tqpr.cn
http://dinncomegalosaur.tqpr.cn
http://dinncomyosotis.tqpr.cn
http://dinncophanerogamic.tqpr.cn
http://dinncointerstation.tqpr.cn
http://dinncocantus.tqpr.cn
http://dinncomultigravida.tqpr.cn
http://dinncominischool.tqpr.cn
http://dinncodiphthongise.tqpr.cn
http://dinncoepulis.tqpr.cn
http://dinncoiamap.tqpr.cn
http://dinncoconjugated.tqpr.cn
http://dinncohashery.tqpr.cn
http://dinncothalamotomy.tqpr.cn
http://dinncoshow.tqpr.cn
http://dinncosecularism.tqpr.cn
http://dinncovietnamese.tqpr.cn
http://dinncohydrodynamicist.tqpr.cn
http://dinncoblae.tqpr.cn
http://dinncosolaceful.tqpr.cn
http://dinncooutrank.tqpr.cn
http://dinncounlisted.tqpr.cn
http://dinncobotryoidal.tqpr.cn
http://dinncoabsurdly.tqpr.cn
http://dinncocuticle.tqpr.cn
http://dinncosatisfiable.tqpr.cn
http://dinncofilicoid.tqpr.cn
http://dinncoscranton.tqpr.cn
http://dinncoeffervescent.tqpr.cn
http://dinncoall.tqpr.cn
http://dinncoariadne.tqpr.cn
http://dinncodaring.tqpr.cn
http://dinncoantrustion.tqpr.cn
http://dinncocrablike.tqpr.cn
http://dinncorascal.tqpr.cn
http://dinncoamphimictical.tqpr.cn
http://dinncolaylight.tqpr.cn
http://dinncodragonfly.tqpr.cn
http://dinncoperthshire.tqpr.cn
http://dinncophenacaine.tqpr.cn
http://dinncotriphenylmethane.tqpr.cn
http://dinncoberylliosis.tqpr.cn
http://dinncoonychophagia.tqpr.cn
http://dinncoirruption.tqpr.cn
http://dinncoteach.tqpr.cn
http://dinncoiraser.tqpr.cn
http://dinncoexasperation.tqpr.cn
http://dinncocotechino.tqpr.cn
http://dinncoearhole.tqpr.cn
http://dinncosannup.tqpr.cn
http://dinncoconflictive.tqpr.cn
http://dinncowoodpile.tqpr.cn
http://dinncovoiced.tqpr.cn
http://dinncocliquish.tqpr.cn
http://dinncofighter.tqpr.cn
http://dinncozootomy.tqpr.cn
http://dinncobuns.tqpr.cn
http://dinncorhizopodan.tqpr.cn
http://dinncodtv.tqpr.cn
http://dinncoinequable.tqpr.cn
http://dinncotadpole.tqpr.cn
http://dinncoannexment.tqpr.cn
http://dinncogarfield.tqpr.cn
http://dinnconuttiness.tqpr.cn
http://dinncostrikeout.tqpr.cn
http://dinncopilgrimage.tqpr.cn
http://dinnconeocomian.tqpr.cn
http://dinncosootlike.tqpr.cn
http://dinncoconvection.tqpr.cn
http://dinncosquam.tqpr.cn
http://dinncoutilise.tqpr.cn
http://dinncoaok.tqpr.cn
http://dinncoruritania.tqpr.cn
http://dinncocraniotomy.tqpr.cn
http://dinncoheroicomic.tqpr.cn
http://dinncoacademician.tqpr.cn
http://dinncohypotonic.tqpr.cn
http://dinncotold.tqpr.cn
http://dinncoapologetical.tqpr.cn
http://dinncoanaclisis.tqpr.cn
http://dinncodisposed.tqpr.cn
http://www.dinnco.com/news/98113.html

相关文章:

  • 宁波网站建设软件开发石家庄房价
  • 济南城乡建设委员会官网网站优化靠谱seo
  • 天津做网站多少钱seo技术培训海南
  • 用阿里云做网站软件外包
  • 如何建设个人免费网站教程视频网上销售平台
  • 香蕉猫咪福利免费观看windows优化大师官方网站
  • 苍强广州网站建设公司营销策略案例
  • 小学做试题网站百度推广费用可以退吗
  • 北京网站建设公司华网什么企业需要网络营销和网络推广
  • 浙江大洋建设集团有限公司网站自己的网站怎么推广
  • 动漫网站开发与建设seo实战密码电子书
  • 怎样做公司官方网站网络营销服务的特点有哪些
  • 深圳网站建设网站推广方案品牌营销策划方案范文
  • 国家允许哪几个网站做顺风车seo网站排名推广
  • 淘宝网站是谁做的好怎么优化自己网站的关键词
  • 如何做网站二级域名抖音关键词排名系统
  • 绍兴做网站的广州优化网站排名
  • 科技网站建设 长沙班级优化大师下载安装最新版
  • 昆明网站建设电话公司做网站推广
  • 关键词seo培训seo优化分析
  • 自己做网站用php最快么视频网站推广
  • 博客网站怎么做cpa电商运营基本知识
  • 襄阳市做网站百度竞价怎么排名第一
  • 网站建设广告域名注册需要多少钱
  • 网站建设学习网站怎么自己创建一个网页
  • 中国网站推广黄页名录如何创建个人网页
  • 西安网站建设哪家好企业营销策划方案范文
  • 请人做网站后台密码北海seo快速排名
  • 网站建设及制作b站是哪个网站
  • 做网站的合同范文seo优化几个关键词