版本比较
CF1427G One Billion Shades of Grey
正文
增加 3 行删除 3 行
18 行未改动1920212223232425262746 行未改动747576777878798081828384848586878880 行未改动18 行未改动// Contest: Luogu// URL: https://www.luogu.com.cn/problem/CF1427G// Memory Limit: 250 MB// Time Limit: 3000 ms// //// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>#define pb emplace_back46 行未改动 } vector<bool> dinic() { int mf = 0; while (bfs()) cr = hd, mf += dfs(s, 1e9); queue<int> q; vector<bool> vs; queue<int> q; vector<bool> vs; vs.resize(n + 5, 0), q.push(s), vs[s] = 1; while (!q.empty()) { int u = q.front(); q.pop(); for (int i = hd[u]; ~i; i = e[i].nxt) { int v = e[i].to; if (!vs[v] && e[i].w && d[v] == d[u] + 1) if (!vs[v] && e[i].w && d[v] == d[u] + 1) vs[v] = 1, q.push(v); } } return vs;80 行未改动