随笔分类 -  题库—UVA

摘要:题意 "题目链接" Sol 神仙题Orz 我们考虑选的边的补集,可以很惊奇的发现,这个补集中的边恰好是原图中的一颗生成树; 并且答案就是所有边权的和减去这个边集中的边的权值; 于是我们只需要求最大生成树就好了; cpp include using namespace std; const int M 阅读全文
posted @ 2018-12-29 17:39 自为风月马前卒 阅读(215) 评论(0) 推荐(0)
摘要:题意 "题目链接" 问从$0$出发能否回到$0$且边权为负 Sol 先用某B姓算法找到负环,再判一下负环上的点能否到$0$ cpp include define chmax(x, y) (x = (x y ? x : y)) define chmin(x, y) (x = (x define MP 阅读全文
posted @ 2018-12-29 17:36 自为风月马前卒 阅读(254) 评论(0) 推荐(0)
摘要:John Doe, a skilled pilot, enjoys traveling. While on vacation, he rents a small plane and starts visiting beautiful places. To save money, John must 阅读全文
posted @ 2017-06-29 20:29 自为风月马前卒 阅读(219) 评论(0) 推荐(0)

Contact with me