HDU3760 Ideal Path 逆bfs+贪心
题目链接题意最短路径 1–>n;多条路径情况下选择路径字典序最小的解题n–>1 bfs最短路 1–>n 满足最短路的条件下找最小颜色代码#include<iostream>#include<cstdio>#include<algorithm>#include<queue>#include<cstring>#include<vector>#define inf 0x3f3f3f3f