摘要:
DP https://www.luogu.com.cn/problem/P2761 这道题其实是个很显然的DP吧,理论复杂度 \(O(2^{20}m)\), 都1e8了,虽然这个跑不满但是还是挺哈人的,哦对这题还是1s 点击查看代码 #include <bits/stdc++.h> using na 阅读全文
posted @ 2021-11-18 14:35
FushimiYuki
阅读(24)
评论(0)
推荐(0)
摘要:
显然的建图和输出方案 https://www.luogu.com.cn/problem/P2763 点击查看代码 #include <bits/stdc++.h> using namespace std; #define endl '\n' typedef long long ll; const i 阅读全文
posted @ 2021-11-18 14:32
FushimiYuki
阅读(31)
评论(0)
推荐(0)
摘要:
匈牙利 https://www.luogu.com.cn/problem/P2756 这种题,除了读懂题意和看对范围之外没什么难的 点击查看代码 #include <bits/stdc++.h> #define endl '\n' #define IOS \ ios::sync_with_stdio 阅读全文
posted @ 2021-11-18 14:30
FushimiYuki
阅读(19)
评论(0)
推荐(0)
摘要:
最大权闭合子图,需要方案 https://www.luogu.com.cn/problem/P2762 没啥好说的,裸的最大权闭合子图。 需要注意的是最后是否连通可以用 dep[v]判断 点击查看代码 #include <bits/stdc++.h> #define endl '\n' #defin 阅读全文
posted @ 2021-11-18 14:27
FushimiYuki
阅读(51)
评论(0)
推荐(0)
摘要:
拆点,费用流,需要输出方案,需要思考一下的建模 https://www.luogu.com.cn/problem/P2770] 题意 给一串城市,从东到西排开,让你找一条路径使得可以从最东边的起点走到最西边然后再回来,并且除了起点,不会重复经过同一个城市。 Tutorial 走过去再走回来,可以将其 阅读全文
posted @ 2021-11-18 14:23
FushimiYuki
阅读(38)
评论(0)
推荐(0)
摘要:
普通最大流,需要输出方案 https://www.luogu.com.cn/problem/P3254 算是很明显的建图了 点击查看代码 #include <bits/stdc++.h> #define endl '\n' #define IOS \ ios::sync_with_stdio(0); 阅读全文
posted @ 2021-11-18 14:19
FushimiYuki
阅读(32)
评论(0)
推荐(0)
摘要:
最大流,边增广边算,分层解决 https://www.luogu.com.cn/problem/P2754 一开始我以为是分层费用流,但是很容易发现这样不知道要分多少层,这个层数其实是我们要求的答案。 因此不难想到一天一天建,当前最大流=需要运输的人数时即可停止 点击查看代码 #include <b 阅读全文
posted @ 2021-11-18 14:17
FushimiYuki
阅读(37)
评论(0)
推荐(0)

浙公网安备 33010602011771号