摘要:
题意 "题目链接" Sol 裸的斜率优化,注意推导过程中的符号问题。 cpp include define Pair pair define MP(x, y) make_pair(x, y) define fi first define se second define int long long 阅读全文
摘要:
题意 "题目链接" Sol 神仙题Orz 我们考虑选的边的补集,可以很惊奇的发现,这个补集中的边恰好是原图中的一颗生成树; 并且答案就是所有边权的和减去这个边集中的边的权值; 于是我们只需要求最大生成树就好了; cpp include using namespace std; const int M 阅读全文
摘要:
题意 "题目链接" Sol 可以这样考虑,在原图中没有边相连的点的值肯定是a / c 那么直接二分图染色即可 cpp include define LL long long using namespace std; const int MAXN = 1001, INF = 1e9 + 10; inl 阅读全文
摘要:
题意 "题目链接" Sol 做的时候忘记写题解了 可以参考 "这位大爷" cpp include define Pair pair define MP make_pair define fi first define se second using namespace std; const int 阅读全文