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

广州手机网站开发报价网站建设买服务器还是数据库

广州手机网站开发报价,网站建设买服务器还是数据库,iis 网站301重定向,网页突然无法访问1 /*2 一张有20个顶点的图上。3 依次输入每个点与哪些点直接相连。4 并且多次询问两点间#xff0c;最短需要经过几条路才能从一点到达另一点。5 6 bfs 水过7 */8 #includeiostream9 #includecstring 10 #includevector 11 #includecstdio 12… 1 /*2 一张有20个顶点的图上。3 依次输入每个点与哪些点直接相连。4 并且多次询问两点间最短需要经过几条路才能从一点到达另一点。5 6 bfs 水过7 */8 #includeiostream9 #includecstring 10 #includevector 11 #includecstdio 12 #includequeue 13 using namespace std; 14 15 struct node{ 16 int x, step; 17 node(){ 18 19 } 20 node(int x, int step){ 21 this-xx; 22 this-stepstep; 23 } 24 }; 25 26 27 vectorintv[25]; 28 queuenodeq; 29 int vis[25]; 30 31 32 int b, e; 33 34 void bfs(){ 35 while(!q.empty()) q.pop(); 36 node cur; 37 q.push(node(b, 0)); 38 while(!q.empty()){ 39 curq.front(); 40 q.pop(); 41 if(cur.xe){ 42 printf(%2d to %2d: %d\n, b, e, cur.step); 43 return; 44 } 45 int lenv[cur.x].size(); 46 for(int i0; ilen; i){ 47 if(v[cur.x][i]e){ 48 printf(%2d to %2d: %d\n, b, e, cur.step1); 49 return; 50 } 51 if(!vis[v[cur.x][i]]){ 52 vis[v[cur.x][i]]1; 53 q.push(node(v[cur.x][i], cur.step1)); 54 } 55 } 56 } 57 } 58 59 int main(){ 60 int n, u; 61 int cnt0; 62 while(scanf(%d, n)!EOF){ 63 while(n--){ 64 scanf(%d, u); 65 v[1].push_back(u); 66 v[u].push_back(1); 67 } 68 for(int i2; i19; i){ 69 scanf(%d, n); 70 while(n--){ 71 scanf(%d, u); 72 v[i].push_back(u); 73 v[u].push_back(i); 74 } 75 } 76 scanf(%d, n); 77 printf(Test Set #%d\n, cnt); 78 while(n--){ 79 scanf(%d%d, b, e) ; 80 bfs(); 81 memset(vis, 0, sizeof(vis)); 82 } 83 printf(\n); 84 for(int i1; i20; i) 85 v[i].clear(); 86 87 } 88 return 0; 89 } 1 /*2 Floyd 才是正解3 */4 #includeiostream5 #includecstring6 #includevector7 #includecstdio8 #includequeue9 #define INF 0x3f3f3f3f 10 using namespace std; 11 12 int map[25][25]; 13 14 void Folyd(){ 15 for(int k1; k20; k) 16 for(int i1; i20; i) 17 for(int j1; j20; j) 18 if(map[i][j] map[i][k] map[k][j]) 19 map[i][j] map[i][k] map[k][j]; 20 } 21 22 23 int main(){ 24 int n, u, b, e; 25 int cnt0; 26 while(scanf(%d, n)!EOF){ 27 memset(map, 0x3f, sizeof(map)); 28 while(n--){ 29 scanf(%d, u); 30 map[1][u]map[u][1]1; 31 } 32 for(int i2; i19; i){ 33 scanf(%d, n); 34 while(n--){ 35 scanf(%d, u); 36 map[u][i]map[i][u]1; 37 } 38 } 39 scanf(%d, n); 40 printf(Test Set #%d\n, cnt); 41 Folyd(); 42 while(n--){ 43 scanf(%d%d, b, e) ; 44 printf(%2d to %2d: %d\n, b, e, map[b][e]); 45 } 46 printf(\n); 47 } 48 }     转载于:https://www.cnblogs.com/hujunzheng/p/3898362.html
http://www.zqtcl.cn/news/801223/

相关文章:

  • 门头沟石家庄网站建设鞍山怎么样做一个自己的网站
  • 网站安装代码宣传网站建设背景
  • 网站空间续费东莞网站建设(信科分公司)
  • 少儿教育网站建设价格网页制作讲解视频
  • 网站开发方向的工作网站怎么做排名
  • 建设网站烧钱iis配置网站是什么
  • 新网站建设特色网站建设信息表
  • 商城做网站家具网站模板
  • 国有企业网站建设网站悬浮qq
  • 上海建站宝盒微网站生成app
  • 做网站是什么时候分页有哪些制作网站的公司
  • 专业柳州网站建设哪家好5千ip的网站能赚多少钱
  • 网站开发代理最火网页游戏
  • 做网站运营工资多少网站建设协议需要注意的问题
  • 如何建设一个人工智能网站qq头像网站源码
  • 有什么网站可以做外贸出口信息泉州网站制作运营商专业
  • 创业seo快速排名优化公司
  • 安丘网站开发王野天 女演员
  • 沈阳软件公司 网站制作wordpress未验证邮箱用户
  • 做动画上传网站赚钱么杭州市网站建设公司
  • 网站建设注意细节问题微信二维码
  • 凡科做的网站提示证书错误网络营销渠道可分为哪几种
  • 南京手机网站制作公司免费设计房屋效果图软件有哪些
  • 定制类网站怎么样做网页设计
  • 企业门户网站建设优势网站登录模版
  • 六盘水建设网站徐州建站平台
  • 昆明有多少做网站的公司公司软文代写
  • 东莞模板网站做一个电子商务网站在哪里做
  • 给别人网站做跳转株洲专业网站排名优化
  • 国外网站空间租用费用网站前端设计图