摘要: 题目链接 题解: 如果不考虑长度限制,可以用二分图染色做。 #include <bits/stdc++.h> # define LL long using namespace std; int n; int a[2001]; int col[2001]; struct Edge{ int to; i 阅读全文
posted @ 2020-02-08 12:58 feibilun 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 题目链接 和leetcode一道题很像。。。 #include <bits/stdc++.h> # define LL long using namespace std; const int INF=0x7fffffff; const int maxn=50002; int n; int f[max 阅读全文
posted @ 2020-02-08 07:30 feibilun 阅读(258) 评论(0) 推荐(0) 编辑