正文
增加 6 行删除 6 行
33 行未改动343536373839404142438 行未改动52535455565758596039 行未改动1001011021031041051061071081091101111121132 行未改动33 行未改动vc.push_back(tp);fl |= (tp == 1), fl2 |= (tp == n);}while(tp ^ x);vc.push_back(u);fl |= (u == 1), fl2 |= (u == n);if(fl && fl2) for(auto i : vc) vis[i] = true;}inline void dfs(int u){dfn[u] = low[u] = ++df, stk[++st] = u;for(auto v : to[u])8 行未改动#define id(u, v) (u * n + v)int tot = 1, head[N], du[N], cnt;bool used[N << 2];struct edge{int u, v, nxt;} e[N << 2];unordered_map<int, int> ew;inline void add(int u, int v) {e[++tot] = {u, v, head[u]}, head[u] = tot;}inline int get(int u){while(used[head[u]]) head[u] = e[head[u]].nxt;39 行未改动return 0;}if(x > 1 && x < n && --du[x] == 2) q.push(x);if(y > 1 && y < n && --du[y] == 2) q.push(y);}else{add(x, y), add(y, x);ew[id(x, y)] = ew[id(y, x)] = w;}}if(cnt > 2) puts("1");else puts("0");return 0;2 行未改动33 行未改动343536373839404142438 行未改动52535455565758596039 行未改动1001011021031041051061071081091101111121132 行未改动33 行未改动vc.push_back(tp);fl |= (tp == 1), fl2 |= (tp == n);}while(tp ^ x);vc.push_back(u);fl |= (u == 1), fl2 |= (u == n);if(fl && fl2) for(auto i : vc) vis[i] = true;}inline void dfs(int u){dfn[u] = low[u] = ++df, stk[++st] = u;for(auto v : to[u])8 行未改动#define id(u, v) (u * n + v)int tot = 1, head[N], du[N], cnt;bool used[N << 2];struct edge{int u, v, nxt;} e[N << 2];unordered_map<int, int> ew;inline void add(int u, int v) {e[++tot] = {u, v, head[u]}, head[u] = tot;}inline int get(int u){while(used[head[u]]) head[u] = e[head[u]].nxt;39 行未改动return 0;}if(x > 1 && x < n && --du[x] == 2) q.push(x);if(y > 1 && y < n && --du[y] == 2) q.push(y);}else{add(x, y), add(y, x);ew[id(x, y)] = ew[id(y, x)] = w;}}if(cnt > 2) puts("1");else puts("0");return 0;2 行未改动