摘要:
Sample Input 6 6 1 3 2 6 3 6 3 2 6 4 4 5Sample Output 2More Info 1<=n,m<1000 #include <iostream> #include <cstdio> #include <algorithm> #include <cmat 阅读全文
posted @ 2021-02-03 21:37
月亮茶
阅读(102)
评论(0)
推荐(0)
摘要:
输入输出样例 Sample Input 3 1 3 1 Sample Output 5 More Info 对于100%的数据,有N≤1000,M≤100000 一道基础的动态规划题目 首先,题目描述的重点在于每次只能移动到下方相邻的格子或者右方相邻的格子,所以,我们就可以得出结论:到达第n个格子的 阅读全文
posted @ 2021-02-03 21:18
月亮茶
阅读(98)
评论(0)
推荐(0)
摘要:
Input 第一行四个数为n,m,n表示顶点个数,m表示边的条数。 接下来m行,每一行有三个数t1、t2 和t3,表示顶点t1到顶点t2的路程是t3。请注意这些t1->t2是单向的。 Output 输出一个n*n的矩阵,第n行第n列表示定点n到n的距离。每一行两个数间由空格隔开 Sample Inp 阅读全文
posted @ 2021-02-03 18:39
月亮茶
阅读(104)
评论(0)
推荐(0)

浙公网安备 33010602011771号