
图论基础算法
文章平均质量分 69
Orion233
这个作者很懒,什么都没留下…
展开
-
A - Knight Moves
HDU 1372A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a c原创 2017-03-20 23:28:46 · 809 阅读 · 0 评论 -
浮生事、”无根树"、事正宗、花正幽——一道“无根树”BFS
原题链接Codeforces 782C Andryusha and Colored Balloons(BFS)Andryusha goes through a park each day. The squares and paths between them look boring to Andryusha, so he decided to decorate them.The park consi原创 2017-03-26 23:06:07 · 1123 阅读 · 0 评论 -
dijkstra+SPFA+Floyd
图论基础算法NO.1 Floyd(多源最短路) 数据结构:邻接矩阵 特点:数据规模不能大(<1000)复杂度O(n^3) 五行代码://Floydvoid floyd(){ for(int k=0;k<n;k++){ for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ dp[原创 2017-04-13 18:18:18 · 453 阅读 · 0 评论 -
13th浙江省赛K Highway Project
Highway ProjectEdward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from the capital as fast as possible. Thus, he proposed the highway原创 2017-04-19 19:03:44 · 321 阅读 · 0 评论