摘要: 图有最小生成树的充要条件:图是可达的 常见表述:从某节点出发可到达其余节点 #include<bits/stdc++.h> using namespace std; struct edge { int a,b,w; bool operator<(edge &other) { return w<oth 阅读全文
posted @ 2024-12-02 20:13 邓佑孤 阅读(7) 评论(0) 推荐(0)
摘要: 题目传送门 #include<bits/stdc++.h> using namespace std; #define max(a,b) a>b?a:b #define min(a,b) a>b?b:a int n;int a[1001];int g[1001][1001]; int main() { 阅读全文
posted @ 2024-12-02 11:22 邓佑孤 阅读(11) 评论(0) 推荐(0)