[Usaco2009 Oct]Heat Wave 热浪
题目描述
有一个 n个点 m 条边的无向图,请求出从 s 到 t 的最短路长度。
输入格式第一行四个正整数 n, m, s, t。 接下来 m 行,每行三个正整数 u, v, w,表示一条连接 u, v 长为 w 的边。
1≤n≤2500,1≤m≤6200,1≤w≤1000。
输出格式
输出一行一个整数,表示答案。
样例输入
Copy to Clipboard
7 11 5 4 2 4 21 4 37 2 23 4 35 7 57 3 36 1 16 3 42 4 35 6 37 2 1
样例输出
Copy to Clipboard
7
/** @Description: To iterate is human, to recurse divine.* @Autor: Recursion* @Date: 2022-03-02 11:52:08* @LastEditTime: 2022-03-24 12:07:32*/
#include <bits/stdc++.h>
#define Inf 2147483647
using namespace std;
int head[(int)1e6+10],cnt;
int dis[(int)1e6+10],vis[(int)1e6+10];
int n,m,s;void init()
{for(int i =
[Usaco2009 Oct]Heat Wave 热浪相关推荐
- bzoj 3386 bzoj 3408: [Usaco2009 Oct]Heat Wave 热浪(最短路)
3408: [Usaco2009 Oct]Heat Wave 热浪 Time Limit: 3 Sec Memory Limit: 128 MB Submit: 301 Solved: 223 [ ...
- 信息学奥赛一本通 1379:热浪(heatwv) | 洛谷 P1339 [USACO09OCT]Heat Wave G
[题目链接] ybt 1379:热浪(heatwv) 洛谷 P1339 [USACO09OCT]Heat Wave G [题目考点] 1. 图论:最短路径 [解题思路] 首先抽象建模.城镇为顶点,道路 ...
- 3409: [Usaco2009 Oct]Barn Echoes 牛棚回声
3409: [Usaco2009 Oct]Barn Echoes 牛棚回声 Time Limit: 3 Sec Memory Limit: 128 MB Submit: 57 Solved: 47 ...
- bzoj 3407: [Usaco2009 Oct]Bessie's Weight Problem 贝茜的体重问题(DP)
3407: [Usaco2009 Oct]Bessie's Weight Problem 贝茜的体重问题 Time Limit: 3 Sec Memory Limit: 128 MB Submit: ...
- bzoj 3406: [Usaco2009 Oct]Invasion of the Milkweed 乳草的入侵
3406: [Usaco2009 Oct]Invasion of the Milkweed 乳草的入侵 Time Limit: 3 Sec Memory Limit: 128 MB Submit: ...
- [USACO09OCT]热浪Heat Wave
未经同意,不得转载. The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make ...
- P1339 [USACO09OCT]热浪Heat Wave(最短路水题)
题目描述 The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for g ...
- 题解- [USACO09OCT]热浪Heat Wave
题目描述 The good folks in Texas are having a heatwave this summer. Their Texas Longhorn cows make for g ...
- P1339 [USACO09OCT]热浪Heat Wave(SPFA)
-------------------------------------- 农夫约翰再显神威,双向热浪,双倍数组 (双倍大小,否则RE) ------------------------------ ...
最新文章
- OpenCV中检测ChArUco的角点(2)
- 回调函数自定义传参_koroFileHeader:一个用于生成文件头部注释和函数注释的插件...
- 噪声dba是什么单位_在职DBA : 工作多年为什么还是选择报读工商管理博士
- java thumbnails 中心点_java Thumbnails 图片处理的使用
- Python拼接字符串的7种方法总结
- VS2015编译MuPDF 1.13.0源码(详细)
- 第一阶段unity基础
- Windows Mobile下C++取屏幕分辨率的方法
- mysql主外键引用关系,关于mysql:数据主/外键关系
- MATLAB————用reshape()函数将矩阵转换为张量
- MVC+EF+Linq 实例
- Redis服务器被劫持风波
- 转:安卓android开源项目(汇总)
- 飞客蠕虫病毒?分析、定位、处理
- 使用openwrt-SDK 生成IPK
- [中医经络学习一]足阳明胃经
- GAMIT基线解算(批处理步骤)
- 华为手机更换第三方桌面
- 【2019年5月23日】指数估值排名
- 保姆级win7下配置虚拟机-安装Ubuntu20.04