摘要:
最小生成树,一道边有点多的题目,需要优化。DescriptionIn 2100, since the sea level rise, most of the cities disappear. Though some survived cities are still connected with others, but most of them become disconnected. The government wants to build some roads to connect all of these cities again, but they don’t want to ta 阅读全文
posted @ 2013-10-04 16:10
little_w
阅读(162)
评论(0)
推荐(0)
摘要:
第一道最小生成树问题 1 #include 2 #include 3 #include 4 #include 5 #define maxn 10000+100 6 using namespace std; 7 int r[maxn]; 8 int u[maxn]; 9 int v[maxn];10 int w[maxn];11 int p[maxn];12 int map[110][110];13 bool inmap[110][110];14 int cmp(const int i,const int j){return w[i]<w[j];}15 int find(int x)16 阅读全文
posted @ 2013-10-04 14:10
little_w
阅读(159)
评论(0)
推荐(0)
摘要:
阅读全文
阅读全文
posted @ 2013-10-04 00:12
little_w
阅读(379)
评论(0)
推荐(0)

浙公网安备 33010602011771号