随笔分类 -  dfs

摘要:题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805073643683840 思路:先求最短路,再用dfs搜点; 1 #include<iostream> 2 #include<algorithm> 3 #inc 阅读全文
posted @ 2022-04-17 10:36 Keyzee 阅读(47) 评论(0) 推荐(0) 编辑
摘要:此题可用前向星建图,可优化时间,但我不会。。。 注意:用cin cout会超时。。。 ac代码: 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<vector> 5 #include<cmath> 6 阅读全文
posted @ 2022-03-25 15:54 Keyzee 阅读(84) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示