题目描述
题目大意:给出一个n个点m条边的无向图,问最少用多少条路径能覆盖每一条边恰好一次。
题解
用并查集维护出每一个连通块,然后统计每一个连通块内有多少个奇点,对答案的贡献应该为max(x/2,1)
需要注意的一点是如果有一个点自己是一个连通块的话对答案的贡献应该为0
口胡一下感觉可以用有上下界的最小流做,然后一看数据范围跑不出来…
代码
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
using namespace std;
#define N 100005
int n,m,ans;