版本比较
AtCoder Beginner Contest 448 Solutions
正文
增加 4 行删除 4 行
69 行未改动7071727374747576777850 行未改动12913013113213313313413513613613713813914096 行未改动23723823924024124124224324424522 行未改动69 行未改动const int MAX = 1e3 + 5;int c[MAX];signed main(){ int n, m, ans = 0; int n, m, ans = 0; cin >> n >> m; for(int i = 1; i <= m; i++) cin >> c[i]; for(int i = 1; i <= n; i++) {50 行未改动using namespace std;
const int MAX = 3e5 + 5;struct Node { int id, num; } a[MAX];int n, q; int n, q;void solve(){ int k, b[10]; int k, b[10]; cin >> k; for(int i = 1; i <= k; i++) cin >> b[i]; for(int i = 1; i <= n; i++) {96 行未改动{ if(++cnt[a[u]] == 2) feas++; if(feas) ans[u] = 1; for(int v : d[u]) if(v != fa) if(v != fa) { dfs(v, u); if(--cnt[a[v]] == 1) feas--; }22 行未改动