摘要:
如果我们先手拿完所有苹果再去考虑花费的话。 S -> 摄像头 -> 苹果 -> T 就相当于找到一个最小割使得S和T分开。 ans = sum - flow。 然后对于这一个模型, 我们可以不用网络流去解决。 我们从叶子出发,然后从下往上合并。 每次到一个节点的时候,我们先把摄像机所对应的影响去除。 阅读全文
摘要:
#include<bits/stdc++.h> using namespace std; const int N = 110010; char str[N], aim[N<<1]; int n; int len[N*2]; void manacher() { memset(len, 0, sizeo 阅读全文