题目链接:uva 1364 - Knights of the Round Table
处理出所有点-双联通分量,判断每个联通分量是否是二分图,如果不是二分图的话所有点即为有会议可以参加。
#include <cstdio>
#include <cstring>
#include <vector>
#include <stack>
#include <algorithm>
using namespace std;
typedef pair<int,int> pii;
const int maxn = 1005;
int N, M, vis[maxn][maxn], color[maxn], odd[maxn];
int cntlock, cntbcc, pre[maxn], low[maxn], iscut[maxn], bccno[maxn];
stack<pii> S;
vector<int> G[maxn], BCC[maxn];
bool bipartite (int u, int d) {
for (int i = 0;