题意:
思路:
- 最大值最小二分哈曼顿距离建边
- 二分图01染色判断是否合理
代码:
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define forn(i,n) for(int i=0;i<n;i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define IO ios::sync_with_stdio(false);cin.tie(0)
const int mod = 1e9+7;
const int maxn = 5005;
int color[maxn],n,ans,res;
pair<int,int>a[maxn];
ll powmod(ll a,ll b){
ll res = 1;
for(