正文
增加 5 行删除 5 行
97 行未改动989910010110210310410510631 行未改动1381391401411421431441451461471481491501511521532 行未改动97 行未改动拓扑排序:记录每一个节点的入度,为零即进队,作为候选答案,一直循环```cpp//你看, 這世界开滿了花。#include <bits/stdc++.h>#define LL long long#define pb push_back31 行未改动n = read();for (int i = 1; i <= n; ++i){LL v; v = read();while (v != 0) { edge[i].pb(v); in_degree[v]++; v = read(); }}for (int i = 1; i <= n; ++i)if (!in_degree[i]) cur.push(i);solve();return 0;}```2 行未改动97 行未改动989910010110210310410510631 行未改动1381391401411421431441451461471481491501511521532 行未改动97 行未改动拓扑排序:记录每一个节点的入度,为零即进队,作为候选答案,一直循环```cpp//你看, 這世界开滿了花。#include <bits/stdc++.h>#define LL long long#define pb push_back31 行未改动n = read();for (int i = 1; i <= n; ++i){LL v; v = read();while (v != 0) { edge[i].pb(v); in_degree[v]++; v = read(); }}for (int i = 1; i <= n; ++i)if (!in_degree[i]) cur.push(i);solve();return 0;}```2 行未改动