摘要:
又是一个裸的费用流板子,不再赘述。 看代码: #include<bits/stdc++.h> using namespace std; #define int long long #define inf 1e12 const int maxn=1e5+10; int n,m,ans1,ans2; s 阅读全文
摘要:
[NOI2006]不得不说远古的题还是比较水的。 这就是一个最大权闭合图的板子题,和拍照一模一样。 看代码: #include<bits/stdc++.h> using namespace std; const int maxn=5*1e5+10; int beg[maxn],nex[maxn],t 阅读全文
摘要:
有了线段树合并的基础后,很容易想到差分最后线段树合并。 这道题跟hdu上的relief grain是重题,然而我们老师却把那道题当做树剖的练手题给我们。 害得我想了好久…… 代码如下: #include<bits/stdc++.h> using namespace std; const int ma 阅读全文