7-1 垃圾箱分布 (30分)

大家倒垃圾的时候,都希望垃圾箱距离自己比较近,但是谁都不愿意守着垃圾箱住。所以垃圾箱的位置必须选在到所有居民点的最短距离最长的地方,同时还要保证每个居民点都在距离它一个不太远的范围内。

现给定一个居民区的地图,以及若干垃圾箱的候选地点,请你推荐最合适的地点。如果解不唯一,则输出到所有居民点的平均距离最短的那个解。如果这样的解还是不唯一,则输出编号最小的地点。

输入格式:
输入第一行给出4个正整数:N(≤10^​3)是居民点的个数;M(≤10)是垃圾箱候选地点的个数;K(≤10 ^​4)是居民点和垃圾箱候选地点之间的道路的条数;D​S是居民点与垃圾箱之间不能超过的最大距离。所有的居民点从1到N编号,所有的垃圾箱候选地点从G1到GM编号。

随后K行,每行按下列格式描述一条道路:

P1 P2 Dist

其中P1和P2是道路两端点的编号,端点可以是居民点,也可以是垃圾箱候选点。Dist是道路的长度,是一个正整数。

输出格式:
首先在第一行输出最佳候选地点的编号。然后在第二行输出该地点到所有居民点的最小距离和平均距离。数字间以空格分隔,保留小数点后1位。如果解不存在,则输出No Solution。

输入样例1:

4 3 11 5
1 2 2
1 4 2
1 G1 4
1 G2 3
2 3 2
2 G2 1
3 4 2
3 G3 2
4 G1 3
G2 G1 1
G3 G2 2

输出样例1:

G1
2.0 3.3

输入样例2:

2 1 2 10
1 G1 9
2 G1 20

输出样例2:

No Solution

题目大意:求最短距离尽可能的大,而且总的距离尽可能小;相同的话再接着判断。。。
该题主要用dijkstra算法,可以计算出该垃圾桶离用户的最短距离和垃圾桶到所有用户的总距离。

优秀题解链接:
https://blog.csdn.net/weixin_43824158/article/details/88784431

答案:

Dijskra算法:

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
const int N = 1205;
using namespace std;int n,k,m,ds;
int e[N][N];
bool v[N];
int d[N];
int kk=1;struct node
{int bh;double p;int h;int zd;
}a[15];bool cmp(node x,node y)
{if(x.zd==y.zd){if(x.p==y.p)return x.bh<y.bh;else return x.p<y.p;}else return x.zd>y.zd;//最短距离要最长
}
void dijstra(int s)
{int i;memset(v,0,sizeof(v));v[s]=1;int zd=INF;for(i=1;i<=n+m;i++){d[i]=e[s][i];if(!v[i]&&i<=n&&d[i]<zd)//条件要写全zd=d[i];}while(1){int k=-1;int mm=INF;for(i=1;i<=n+m;i++){if(!v[i]&&d[i]<mm){k=i;mm=d[i];}}if(k==-1) break;v[k]=1;for(i=1;i<=n+m;i++){if(d[i]>d[k]+e[k][i]){d[i]=d[k]+e[k][i];if(!v[i]&&i<=n&&d[i]<zd)zd=d[i];//把最短的距离找出来}}}int ss=0;for(i=1;i<=n;i++){if(d[i]>ds) break;//最短路径超出范围的不要else ss+=d[i];}if(i==n+1){a[kk].bh =s-n;a[kk].h=ss;a[kk].zd=zd;a[kk++].p=ss*1.0/n;}
}int main()
{cin>>n>>m>>k>>ds;int i,j;for(i=1;i<=n+m;i++)for(j=1;j<=n+m;j++){if(i==j) e[i][j]=0;else e[i][j]=INF;}for(i=1;i<=k;i++){string a,b;//G的处理int z;cin>>a>>b>>z;int x=0,y=0;if(a[0]!='G'){int l=a.length ();for(int i=0;i<l;i++){x=x*10+a[i]-'0';}}else{int l=a.length ();for(int i=1;i<l;i++){x=x*10+a[i]-'0';}x+=n;}if(b[0]!='G'){int l=b.length ();for(int i=0;i<l;i++){y=y*10+b[i]-'0';}}else{int l=b.length ();for(int i=1;i<l;i++){y=y*10+b[i]-'0';}y+=n;}if(e[x][y]>z){e[x][y]=z;e[y][x]=z;}}for(int i=n+1;i<=m+n;i++)//遍历每一个垃圾箱{dijstra(i);}if(k==1) cout<<"No Solution";else{sort(a+1,a+kk,cmp);//排个序,是kkif(a[1].bh==0)  cout<<"No Solution";else{cout<<"G"<<a[1].bh<<endl;printf("%.1lf",a[1].zd*1.0);cout<<" ";printf("%.1lf",a[1].p);}}return 0;
}

7-2 旅游规划 (25分)

有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。

输入格式:
输入说明:输入数据的第1行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市的编号为0~(N−1);M是高速公路的条数;S是出发地的城市编号;D是目的地的城市编号。随后的M行中,每行给出一条高速公路的信息,分别是:城市1、城市2、高速公路长度、收费额,中间用空格分开,数字均为整数且不超过500。输入保证解的存在。

输出格式:
在一行里输出路径的长度和收费总额,数字间以空格分隔,输出结尾不能有多余空格。

输入样例:

4 5 0 3
0 1 1 20
1 3 2 30
0 3 4 10
0 2 2 20
2 3 1 20

输出样例:

3 40

Floyd算法:

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
const int N = 505;
using namespace std;int dis[N], G[N][N];
int P[N][N];
bool vis[N];
int n,m,s,d;
void floyd()
{for(int k = 0; k < n; k++)for(int i = 0; i < n; i++)for(int j = 0; j < n; j++)if(G[i][j]>G[i][k]+G[k][j]){G[i][j] = G[i][k]+G[k][j];P[i][j] = P[i][k]+P[k][j];}else if(G[i][j]==G[i][k]+G[k][j]){P[i][j] = min(P[i][j],P[i][k]+P[k][j]);}printf("%d %d\n", G[s][d],P[s][d]);
}int main()
{ios::sync_with_stdio(0);cin>>n>>m>>s>>d;int x,y,k,p;memset(vis, 0, sizeof(vis));for(int i = 0; i < n; i++)for(int j = 0; j < n; j++){if(i == j)G[i][j] = 0;elseG[i][j] = INF;}for(int i = 0; i < m; i++){cin>>x>>y>>k>>p;G[x][y] = G[y][x] = k;P[x][y] = P[y][x] = p;}floyd();return 0;
}

Dijskra算法:

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
const int N = 505;
using namespace std;int G[N][N];
int d[N];
bool dp[N];
int P[N][N];
int sum[N];int n,m,S,D;void Dij(int s)
{memset(d,INF,sizeof(d));memset(dp,false,sizeof(dp));memset(sum,0,sizeof(sum));d[s] = 0;while(1){int v = -1;for(int i=0; i<n; i++){if(!dp[i] && (v == -1 || d[i] < d[v])){v = i;}}if(v == -1) break;dp[v] = true;for(int i=0; i<N; i++){if(!dp[i]){if(d[i]>d[v]+G[v][i]){d[i] = d[v] + G[v][i];sum[i] = sum[v] + P[v][i];}else if(d[i] == d[v] + G[v][i]){if(sum[i]>sum[v]+P[v][i]){sum[i] = sum[v] + P[v][i];}}}}}
}int main()
{cin>>n>>m>>S>>D;for(int i=0; i<n; i++){for(int j=0; j<n; j++){if(i==j)G[i][j] = 0;elseG[i][j] = INF;}}for(int i=0; i<m; i++){int a,b,c,d;cin>>a>>b>>c>>d;G[a][b] = G[b][a] = c;P[a][b] = P[b][a] = d;}Dij(S);printf("%d %d\n",d[D],sum[D]);return 0;
}

7-3 周游世界 (30分)

周游世界是件浪漫事,但规划旅行路线就不一定了…… 全世界有成千上万条航线、铁路线、大巴线,令人眼花缭乱。所以旅行社会选择部分运输公司组成联盟,每家公司提供一条线路,然后帮助客户规划由联盟内企业支持的旅行路线。本题就要求你帮旅行社实现一个自动规划路线的程序,使得对任何给定的起点和终点,可以找出最顺畅的路线。所谓“最顺畅”,首先是指中途经停站最少;如果经停站一样多,则取需要换乘线路次数最少的路线。

输入格式:
输入在第一行给出一个正整数N(≤100),即联盟公司的数量。接下来有N行,第i行(i=1,⋯,N)描述了第i家公司所提供的线路。格式为:

M S[1] S[2] ⋯ S[M]

其中M(≤100)是经停站的数量,S[i](i=1,⋯,M)是经停站的编号(由4位0-9的数字组成)。这里假设每条线路都是简单的一条可以双向运行的链路,并且输入保证是按照正确的经停顺序给出的 —— 也就是说,任意一对相邻的S[i]和S[i+1](i=1,⋯,M−1)之间都不存在其他经停站点。我们称相邻站点之间的线路为一个运营区间,每个运营区间只承包给一家公司。环线是有可能存在的,但不会不经停任何中间站点就从出发地回到出发地。当然,不同公司的线路是可能在某些站点有交叉的,这些站点就是客户的换乘点,我们假设任意换乘点涉及的不同公司的线路都不超过5条。

在描述了联盟线路之后,题目将给出一个正整数K(≤10),随后K行,每行给出一位客户的需求,即始发地的编号和目的地的编号,中间以一空格分隔。

输出格式:
处理每一位客户的需求。如果没有现成的线路可以使其到达目的地,就在一行中输出“Sorry, no line is available.”;如果目的地可达,则首先在一行中输出最顺畅路线的经停站数量(始发地和目的地不包括在内),然后按下列格式给出旅行路线:

Go by the line of company #X1 from S1 to S2.
Go by the line of company #X2 from S2 to S3.
......

其中Xi是线路承包公司的编号,Si是经停站的编号。但必须只输出始发地、换乘点和目的地,不能输出中间的经停站。题目保证满足要求的路线是唯一的。

输入样例:

4
7 1001 3212 1003 1204 1005 1306 7797
9 9988 2333 1204 2006 2005 2004 2003 2302 2001
13 3011 3812 3013 3001 1306 3003 2333 3066 3212 3008 2302 3010 3011
4 6666 8432 4011 1306
4
3011 3013
6666 2001
2004 3001
2222 6666

输出样例:

2
Go by the line of company #3 from 3011 to 3013.
10
Go by the line of company #4 from 6666 to 1306.
Go by the line of company #3 from 1306 to 2302.
Go by the line of company #2 from 2302 to 2001.
6
Go by the line of company #2 from 2004 to 1204.
Go by the line of company #1 from 1204 to 1306.
Go by the line of company #3 from 1306 to 3001.
Sorry, no line is available.

思路:先用结构体储存当前公司的下一个经停站编号和当前公司编号,双向储存(用vector把这些结构体串成无向图)
然后对每一对数据dfs就好了,注意因为可能会构成环形回路,所以要把第一个标记,并且dfs下一个前把当前的点标记,dfs后把当前点标记取消,因为路可能会交叉,要换乘。
注意dfs里的代码,如果要换乘的话,就要记录当前的点和当前的公司编号,还是用vector,但是和标记一样,要记得回溯。
这个代码是放入换乘前的点,所以最后要加入终点。
(大佬思路)

优秀题解:
https://blog.csdn.net/Fooooooo/article/details/103624432

答案:

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
const int N = 1e4 + 10;
using namespace std;int n,m,a,b;
int stop,com;
int p[N];typedef struct road List;
struct road
{int next,num;
};vector<road>vec[N];
vector<int>t1,t2,hcl,hce;void dfs(int h,int s,int c,int n);int main()
{cin>>n;int t,temp,T;for(int i=1; i<=n; i++){cin>>t>>temp;t--;for(int j=0; j<t; j++){cin>>T;List t2;t2.num=i;t2.next=T;vec[temp].push_back(t2);t2.next=temp;vec[T].push_back(t2);temp=T;}}cin>>t;while(t--){cin>>a>>b;memset(p,0,sizeof(p));p[a]=1;stop=INF;com=INF;t1.clear(),t2.clear(),hce.clear(),hcl.clear();dfs(a,0,0,0);if(stop==INF)cout<<"Sorry, no line is available."<<endl;else{cout<<stop<<endl;hcl.push_back(b);for(int i=0; i<com; i++){printf("Go by the line of num #%d from %04d to %04d.\n",hce[i],hcl[i],hcl[i+1]);}}}return 0;
}void dfs(int h,int s,int c,int n)
{if(h==b){if(s<stop||(s==stop&&c<com)){stop=s;com=c;hce=t1;hcl=t2;}return ;}for(int i=0; i<vec[h].size(); i++){if(p[vec[h][i].next])continue;p[vec[h][i].next]=1;if(n==vec[h][i].num)dfs(vec[h][i].next,s+1,c,n);else{t1.push_back(vec[h][i].num);t2.push_back(h);dfs(vec[h][i].next,s+1,c+1,vec[h][i].num);t1.pop_back();t2.pop_back();}p[vec[h][i].next]=0;}
}

7-4 城市间紧急救援 (25分)

作为一个城市的应急救援队伍的负责人,你有一张特殊的全国地图。在地图上显示有多个分散的城市和一些连接城市的快速道路。每个城市的救援队数量和每一条连接两个城市的快速道路长度都标在地图上。当其他城市有紧急求助电话给你的时候,你的任务是带领你的救援队尽快赶往事发地,同时,一路上召集尽可能多的救援队。

输入格式:
输入第一行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市的编号为0 ~ (N−1);M是快速道路的条数;S是出发地的城市编号;D是目的地的城市编号。

第二行给出N个正整数,其中第i个数是第i个城市的救援队的数目,数字间以空格分隔。随后的M行中,每行给出一条快速道路的信息,分别是:城市1、城市2、快速道路的长度,中间用空格分开,数字均为整数且不超过500。输入保证救援可行且最优解唯一。

输出格式:
第一行输出最短路径的条数和能够召集的最多的救援队数量。第二行输出从S到D的路径中经过的城市编号。数字间以空格分隔,输出结尾不能有多余空格。

输入样例:

4 5 0 3
20 30 40 10
0 1 1
1 3 2
0 3 3
0 2 2
2 3 2

输出样例:

2 60
0 1 3

答案:

#include <iostream>
#include<bits/stdc++.h>
#define ll long long
#define INF 0x3f3f3f3f
const int N = 1111;
using namespace std;int a[N][N];
int G[N],vis[N]= {0},cf[N],P[N],Q[N];
//最短路径条数,各城市是否经过,各城市的救援队数量,到达该城市时所召集的所有救援队数量,到达该城市前经过的城市编号
int n,m,s,d;
void Dijkstra()
{G[s]=1;//开始时路径条数为1vis[s]=1;//当前在出发城市for(int i=0; i<n; i++){int min=INF,f=-1;for(int j=0; j<n; j++){if(vis[j]==0&&a[s][j]<min) //寻找下一个距离最短的城市{min=a[s][j];f=j;//做好下一城市编号的标记}}if(f==-1)break;//与其他未经过的城市不连通,退出循环elsevis[f]=1;//到达下一城市for(int j=0; j<n; j++){if(vis[j]==0&&a[s][j]>a[s][f]+a[f][j]) //到达某一城市的最短路径{a[s][j]=a[s][f]+a[f][j];//最短路径更新Q[j]=f;//记录上一个城市编号G[j]=G[f];//拷贝到达上一个城市时的最短路径条数P[j]=P[f]+cf[j];//到达某城市召集的全部救援队数量}else if(vis[j]==0&&a[s][j]==a[s][f]+a[f][j]) //发现其他的最短路径{G[j]=G[j]+G[f];//更新到达当前城市时的最短路径条数if(P[j]<P[f]+cf[j]) //最多救援队数量更新{Q[j]=f;//记录所经过的上一个城市编号P[j]=P[f]+cf[j];//更新救援队总数}}}}
}int main()
{cin>>n>>m>>s>>d;for(int i=0; i<n; i++){cin>>cf[i];P[i]=cf[i];G[i]=1;}for(int i=0; i<n; i++){for(int j=0; j<n; j++){if(i!=j)a[i][j]=a[j][i]=INF;//初始化(双向图)}}for(int i=0; i<m; i++){int q,w,e;cin>>q>>w>>e;a[q][w]=a[w][q]=e;}Dijkstra();cout<<G[d]<<" "<<P[d]+cf[s]<<endl;int road[N];int x=0,t=d;while(Q[t]!=0) //所经历的城市的从后往前的顺序{road[x++]=Q[t];t=Q[t];}cout<<s;//出发地for(int i=x-1; i>=0; i--)cout<<" "<<road[i];cout<<" "<<d;//目的地cout<<endl;return 0;
}

7-5 拯救007(升级版) (30分)

在老电影“007之生死关头”(Live and Let Die)中有一个情节,007被毒贩抓到一个鳄鱼池中心的小岛上,他用了一种极为大胆的方法逃脱 —— 直接踩着池子里一系列鳄鱼的大脑袋跳上岸去!(据说当年替身演员被最后一条鳄鱼咬住了脚,幸好穿的是特别加厚的靴子才逃过一劫。)

设鳄鱼池是长宽为100米的方形,中心坐标为 (0, 0),且东北角坐标为 (50, 50)。池心岛是以 (0, 0) 为圆心、直径15米的圆。给定池中分布的鳄鱼的坐标、以及007一次能跳跃的最大距离,你需要给他指一条最短的逃生路径 —— 所谓“最短”是指007要跳跃的步数最少。

输入格式:
首先第一行给出两个正整数:鳄鱼数量 N(≤100)和007一次能跳跃的最大距离 D。随后 N 行,每行给出一条鳄鱼的 (x,y) 坐标。注意:不会有两条鳄鱼待在同一个点上。

输出格式:
如果007有可能逃脱,首先在第一行输出007需要跳跃的最少步数,然后从第二行起,每行给出从池心岛到岸边每一步要跳到的鳄鱼的坐标 (x,y)。如果没可能逃脱,就在第一行输出 0 作为跳跃步数。如果最短路径不唯一,则输出第一跳最近的那个解,题目保证这样的解是唯一的。

输入样例 1:

17 15
10 -21
10 21
-40 10
30 -50
20 40
35 10
0 -10
-25 22
40 -40
-30 30
-10 22
0 11
25 21
25 10
10 10
10 35
-30 10

输出样例 1:

4
0 11
10 21
10 35

输入样例 2:

4 13
-12 12
12 12
-12 -12
12 -12

输出样例 2:

0

7-6 Harry Potter’s Exam (25分)

In Professor McGonagall’s class of Transfiguration, Harry Potter is learning how to transform one object into another by some spells. He has learnt that, to turn a cat into a mouse one can say docamo! To reverse the effect, simply say decamo! Formally speaking, the transfiguration spell to transform between object A and object B is said to be S if there are two spells, doS and deS, to turn A into B and vice versa, respectively.

In some cases, short-cut spells are defined to make transfiguration easier. For example, suppose that the spell to transform a cat to a mouse is docamo, and that to transform a mouse into a fatmouse is dofamo, then to turn a cat into a fatmouse one may say docamodofamo! Or if a shot-cut spell is defined to be cafam, one may get the same effect by saying docafam!

Time is passing by quickly and the Final Exam is coming. By the end of the transfiguration exam, students will be requested to show Professor McGonagall several objects transformed from the initial objects they bring to the classroom. Each of them is allowed to bring 1 object only.

Now Harry is coming to you for help: he needs a program to select the object he must take to the exam, so that the maximum length of any spell he has to say will be minimized. For example, if cat, mouse, and fatmouse are the only three objects involved in the exam, then mouse is the one that Harry should take, since it will take a 6-letter spell to turn a mouse into either a cat or a fatmouse. Cat is not a good choice since it will take at least a 7-letter spell to turn it into a fatmouse. And for the same reason Harry must not take a fatmouse.

Input Specification:
Each input file contains one test case. For each case, the first line contains two positive integers N (≤100) and M, which are the total number of objects involved in the exam and the number of spells to be tested, respectively. For the sake of simplicity, the objects are numbered from 1 to N. Then M lines follow, each contains 3 integers, separated by a space: the numbers of two objects, and the length of the spell to transform between them.

Output Specification:
For each test case, print in one line the number of the object which Harry must take to the exam, and the maximum length of the spell he may have to say. The numbers must be separated by a space.

If it is impossible to complete all the transfigurations by taking one object only, simply output 0. If the solution is not unique, output the one with the smallest number.

Sample Input:

6 11
3 4 70
1 2 1
5 4 50
2 6 50
5 6 60
1 3 70
4 6 60
3 6 80
5 1 100
2 4 60
5 2 80

Sample Output:

4 70

7-7 Saving James Bond - Hard Version (30分)

This time let us consider the situation in the movie “Live and Let Die” in which James Bond, the world’s most famous spy, was captured by a group of drug dealers. He was sent to a small piece of land at the center of a lake filled with crocodiles. There he performed the most daring action to escape – he jumped onto the head of the nearest crocodile! Before the animal realized what was happening, James jumped again onto the next big head… Finally he reached the bank before the last crocodile could bite him (actually the stunt man was caught by the big mouth and barely escaped with his extra thick boot).

Assume that the lake is a 100 by 100 square one. Assume that the center of the lake is at (0,0) and the northeast corner at (50,50). The central island is a disk centered at (0,0) with the diameter of 15. A number of crocodiles are in the lake at various positions. Given the coordinates of each crocodile and the distance that James could jump, you must tell him a shortest path to reach one of the banks. The length of a path is the number of jumps that James has to make.

Input Specification:
Each input file contains one test case. Each case starts with a line containing two positive integers N (≤100), the number of crocodiles, and D, the maximum distance that James could jump. Then N lines follow, each containing the (x,y) location of a crocodile. Note that no two crocodiles are staying at the same position.

Output Specification:
For each test case, if James can escape, output in one line the minimum number of jumps he must make. Then starting from the next line, output the position (x,y) of each crocodile on the path, each pair in one line, from the island to the bank. If it is impossible for James to escape that way, simply give him 0 as the number of jumps. If there are many shortest paths, just output the one with the minimum first jump, which is guaranteed to be unique.

Sample Input 1:

17 15
10 -21
10 21
-40 10
30 -50
20 40
35 10
0 -10
-25 22
40 -40
-30 30
-10 22
0 11
25 21
25 10
10 10
10 35
-30 10

Sample Output 1:

4
0 11
10 21
10 35

Sample Input 2:

4 13
-12 12
12 12
-12 -12
12 -12

Sample Output 2:

0

7-8 直捣黄龙 (30分)

本题是一部战争大片 —— 你需要从己方大本营出发,一路攻城略地杀到敌方大本营。首先时间就是生命,所以你必须选择合适的路径,以最快的速度占领敌方大本营。当这样的路径不唯一时,要求选择可以沿途解放最多城镇的路径。若这样的路径也不唯一,则选择可以有效杀伤最多敌军的路径。

输入格式:
输入第一行给出2个正整数N(2 ≤ N ≤ 200,城镇总数)和K(城镇间道路条数),以及己方大本营和敌方大本营的代号。随后N-1行,每行给出除了己方大本营外的一个城镇的代号和驻守的敌军数量,其间以空格分隔。再后面有K行,每行按格式城镇1 城镇2 距离给出两个城镇之间道路的长度。这里设每个城镇(包括双方大本营)的代号是由3个大写英文字母组成的字符串。

输出格式:
按照题目要求找到最合适的进攻路径(题目保证速度最快、解放最多、杀伤最强的路径是唯一的),并在第一行按照格式己方大本营->城镇1->…->敌方大本营输出。第二行顺序输出最快进攻路径的条数、最短进攻距离、歼敌总数,其间以1个空格分隔,行首尾不得有多余空格。

输入样例:

10 12 PAT DBY
DBY 100
PTA 20
PDS 90
PMS 40
TAP 50
ATP 200
LNN 80
LAO 30
LON 70
PAT PTA 10
PAT PMS 10
PAT ATP 20
PAT LNN 10
LNN LAO 10
LAO LON 10
LON DBY 10
PMS TAP 10
TAP DBY 10
DBY PDS 10
PDS PTA 10
DBY ATP 10

输出样例:

PAT->PTA->PDS->DBY
3 30 210

2020年全国天梯赛赛前个人专题强化赛---C(最短路)相关推荐

  1. 2020年全国职业院校技能大赛改革试点赛(中职组)A模块

    文章目录 A-1 任务一登录安全加固 A-2 任务二 数据库加固(Data) A-3 任务三 Web 安全加固(Web) A-4 任务四 流量完整性保护(Web,Data) A-5 任务五 事件监控( ...

  2. 2020年全国职业院校技能大赛改革试点赛(中职组)

    为赛卷一,环境都是自己做的,仅作参考 网络安全竞赛试题 (一)(总分100分) 赛题说明 一.竞赛项目简介 "网络安全"竞赛共分A. 基础设施设置与安全加固:B. 网络安全事件响应 ...

  3. 2020年全国职业院校技能大赛改革试点赛样卷五

    目录 一.竞赛介绍 二.竞赛时间 三.竞赛注意事项 四.竞赛结果文件的提交

  4. 2020年全国职业院校技能大赛改革试点赛样卷二

    目录 一.竞赛介绍 1.登录 2.系统配置 3.竞赛环境 二.竞赛时间

  5. 2020年全国职业院校技能大赛改革试点赛样卷三

    目录 一.竞赛介绍 1.登录 2.系统配置 3.竞赛环境 二.竞赛时间 三.竞赛注意事项

  6. 2020研究生数学建模结果_关于举办2020年全国研究生数学建模大赛的通知

    2020年全国研究生数学建模大赛开始啦! 各学院: 为在大学生中倡导学习统计.应用统计的良好氛围,适应大数据时代的高校统计和数据科学人才的培养要求,提高研究生的数据挖掘.数据分析.运用计算机处理数据的 ...

  7. 2020中国移动创客马拉松大赛移动云专题赛决赛成功举办

    今天,2020年中国移动创客马拉松移动云专题赛决赛暨颁奖典礼在苏州中移软件园举行.大赛作为中国移动年度双创系列赛事的重要组成部分,围绕移动云的应用,融合云计算.大数据.人工智能等技术,汇行业大咖,聚创 ...

  8. 关于2020年全国大学生电子设计竞赛 ——信息科技前沿专题邀请赛(瑞萨杯)竞赛时间调整的通知

    各有关高等学校: 受疫情影响,全国大学生电子设计竞赛组织委员会决定, 2020年全国大学生电子设计竞赛--信息科技前沿专题邀请赛(瑞萨杯)竞赛时间安排调整如下. 一. 竞赛时间安排 竞赛时间:2020 ...

  9. 【PTA】2022年蓝桥杯及天梯赛赛前训练(C++练习)

    [PTA]2022年蓝桥杯及天梯赛赛前训练(C++练习) 前言 L1-1 嫑废话上代码 L1-2 猫是液体 L1-3 洛希极限 L1-4 调和平均 L1-5 胎压监测 L1-6 吃火锅 L1-7 前世 ...

最新文章

  1. R语言使用ggpubr包的ggarrange函数组合多张结论图:使用ggpubr包将多个可视化结论嵌套起来输出(ggarrange组合ggarrange组合后的图像)
  2. hbase1.1.1 连接集群_除了HAProxy,RabbitMQ集群还可以这样用
  3. 非标准配置linux,剖析非标准波特率的设置和使用于Linux操作系统中
  4. 每秒100W请求,12306秒杀业务,架构如何优化?
  5. 雪鹰领主服务器维护,《雪鹰领主》7月14日维护更新公告
  6. 山东大学继续教育计算机3,山东大学继续教育数字电子技术基础试题3及答案.doc...
  7. VTK:PolyData之TransformPipeline
  8. Java多线程编程递增_java多线程编程之简介
  9. opencv 读取CV_16U图像 c++
  10. signature=27ba8feff228d8babc1d1762f8da4445,Embedding digital signatures into digital payloads
  11. linux分区表导出与恢复,Linux下硬盘数据恢复与分区表恢复
  12. logback日志pattern_logback-自定义Pattern模板
  13. yum安装Apache2.4
  14. java做一个鼠标连点_用C语言写一个鼠标连点器
  15. 极飞亮相世界无人机大会,创始人彭斌讲述农业无人机的未来
  16. Twitter上热门的技巧与思路
  17. 基于JavaWeb的学生考勤系统
  18. 【Datawhale组队学习Pytorch】Task 完结篇
  19. 在 LaTeX 中定义变量
  20. 旅游地图制作_手把手教你用旅游神器App:谷歌地图

热门文章

  1. html5 打开网页自动全屏,html5 网页全屏显示
  2. Vue-Router报错:Uncaught (in promise)Error: Navigation cancelled from “/“ to “/1“ with a new navigation
  3. 定位+精灵图时,精灵图缩放用法
  4. 使用AD绘制stm32最小系统版
  5. 我的世界服务器自动刷矿机,我的世界自动刷矿机怎么制作 | 我的世界 | MC世界侠...
  6. 第一个Python程序——自学廖雪峰教程之特小白特啰嗦的笔记Python篇
  7. Tensorflow学习笔记-过度拟合问题
  8. 思政课资料(思修+毛概+近代史+马原)
  9. otrs安装mysql_如何部署工单系统OTRS?
  10. 五千买Android手机划算吗,啥时候买Android手机最划算?