摘要:
题目链接 "luogu [TJOI2007]线段" 题解 dp[i][0/1]第i行在左/右端点的最短路 瞎转移 代码 c++ include using namespace std; inline int read() { int x= 0 ,f = 1; char c = getchar(); 阅读全文
摘要:
题目链接 "luogu P2770 航空路线问题" 题解 求两条点数最多的互不相交路径 拆点限流,连流量1费用2的边,起.终点流量为2的边 代码 c++ include using namespace std; inline int read() { int x = 0,f = 1; char c 阅读全文
摘要:
题目链接 "bzoj4668: 冷战" 题解 按秩合并并查集,每次增长都是小集合倍数的两倍以上,层数不超过logn 查询路径最大值 LCT同解 代码 c++ include using namespace std; inline int read() { int x = 0,f = 1; char 阅读全文
摘要:
题目链接 "bzoj1211: [HNOI2004]树的计数" 题解 prufer序 可重排列计数 代码 c++ include using namespace std; define int long long int n = 0; int b[10007]; int cnt[10007]; vo 阅读全文