摘要:
题意:求无向图路径中的最大带权值.解法:深搜 1 // Problem#: 9859 2 // Submission#: 2661875 3 // The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License 4 // URI: http://creativecommons.org/licenses/by-nc-sa/3.0/ 5 // All Copyright reserved by Informatic Lab of Sun Yat- 阅读全文
摘要:
题意:字符串的操作处理 1 // Problem#: 8768 2 // Submission#: 2606406 3 // The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License 4 // URI: http://creativecommons.org/licenses/by-nc-sa/3.0/ 5 // All Copyright reserved by Informatic Lab of Sun Yat-sen Univers 阅读全文
摘要:
题意:判断有向图两点之间是否可通达!解法:深搜或广搜(注意避免旧路重行) DFS: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct Road{ 7 int From; 8 int Dest; 9 bool Vist;10 Road(int f,int d,bool v){11 From = f;12 Dest = d;13 Vist = v;14 }15 };16 vector roads[20001];17 b... 阅读全文