版本比较
2026.1.30_401_总结
正文
增加 6 行删除 6 行
69 行未改动7071727374747576777834 行未改动11311411511611711711811912012012112212312435 行未改动1601611621631641641651661671687 行未改动17617717817918018018118218318446 行未改动23123223323423523523623723823911 行未改动69 行未改动 if(vis[v] != id){ vis[v] = id; dfs(v); } } }}
int main(){ ios::sync_with_stdio(false);34 行未改动void dfs(int u, int dep){ ans++; for(auto v : g[u]){ if(!vis[v] && dep + 1 <= d){ vis[v] = 1; vis[v] = 1; dfs(v, dep + 1); } } }}
int main(){ ios::sync_with_stdio(false);35 行未改动 if(vis[v][dep + 1] != id && dep + 1 <= k){ vis[v][dep + 1] = id; dfs(v, dep + 1); } } }}
int main(){ ios::sync_with_stdio(false);7 行未改动 for(int i = 1; i <= n; i++){ id = i; vis[i][0] = i; dfs(i, 0); } } for(int i = 1; i <= n; i++){ for(int j = 1; j <= k; j++){ cout << cnt[i][j] << " "; }46 行未改动 ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m >> a >> b; for(int i = 0; i < n; i++){ cin >> aa[i]; cin >> aa[i]; d[i] = 1e9; } for(int i = 1; i <= m; i++){ cin >> x >> y;11 行未改动