题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1003
分析一下题目,不难发现最终答案中每一天的线路一定是n天中,某天的最短路
于是跑n^2遍Dijkstra,然后跑n^2的DP即可
代码可以去参考PoPoQQQ辣:http://blog.csdn.net/popoqqq/article/details/40150855
题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1003
分析一下题目,不难发现最终答案中每一天的线路一定是n天中,某天的最短路
于是跑n^2遍Dijkstra,然后跑n^2的DP即可
代码可以去参考PoPoQQQ辣:http://blog.csdn.net/popoqqq/article/details/40150855
Great work! This is the type of information that should be shared around the net. Shame on the search engines for not positioning this post higher! Come on over and visit my website . Thanks =)
Hello there! This is my first comment here so I just wanted to give a quick shout out and say I truly enjoy reading your articles. Can you recommend any other blogs/websites/forums that go over the same subjects? Thanks!