正文
增加 3 行删除 3 行
242 行未改动全部展开2432442452462472482492502513 行未改动2552562572582592602612622632642652667 行未改动242 行未改动全部展开```### [P8605 [蓝桥杯 2013 国 AC] 网络寻路](https://www.luogu.com.cn/problem/P8605)我们枚举每一条边,它两边各有 `cnt[a[i].x] - 1` 个点和 `cnt[a[i].xy] - 1` 个点,相乘可以得到方案数。```cpp#include<bits/stdc++.h>#define int long long3 行未改动int x, y;}a[100005];int cnt[100005];signed main(){cin >> n >> m;for (int i = 1; i <= m; i++){cin >> a[i].x >> a[i].y;cnt[a[i].x]++;cnt[a[i].y]++;7 行未改动242 行未改动全部展开2432442452462472482492502513 行未改动2552562572582592602612622632642652667 行未改动242 行未改动全部展开```### [P8605 [蓝桥杯 2013 国 AC] 网络寻路](https://www.luogu.com.cn/problem/P8605)我们枚举每一条边,它两边各有 `cnt[a[i].x] - 1` 个点和 `cnt[a[i].xy] - 1` 个点,相乘可以得到方案数。```cpp#include<bits/stdc++.h>#define int long long3 行未改动int x, y;}a[100005];int cnt[100005];signed main(){cin >> n >> m;for (int i = 1; i <= m; i++){cin >> a[i].x >> a[i].y;cnt[a[i].x]++;cnt[a[i].y]++;7 行未改动