摘要: I -Arctic Network#include<iostream> #include<algorithm> using namespace std; const int maxn=6000; int n; int mapp[maxn][maxn]; struct node { int x,y,value; }edge[maxn]; int fa[maxn]; bool cmp(const node a,const node b) { return a.value<b.value; } int find(int x) { return x==fa[x]?x:fi 阅读全文
posted @ 2013-04-19 20:57 bo_jwolf 阅读(165) 评论(0) 推荐(0) 编辑
摘要: B -Network这个题目真坑,用G++居然TLE,用c++ 直接A了,还好在poj直接过了,否则,找错误不得找死啊!!!!#include<iostream> #include<algorithm> using namespace std; const int maxn=15001; struct node { int x,y,value; }edge[maxn]; int fa[maxn]; int find(int x) { return x==fa[x]?x:find(fa[x]); } bool cmp(const node a,const node b) 阅读全文
posted @ 2013-04-19 15:23 bo_jwolf 阅读(151) 评论(0) 推荐(0) 编辑
摘要: J -Agri-Net#include<iostream> #include<algorithm> using namespace std; const int maxn=101; struct node { int x,y,value; }edge[maxn*maxn]; int fa[maxn]; int k; int find(int x) { return x==fa[x]?x:find(fa[x]); } bool cmp(const node a,const node b) { return a.value<b.value; } int main() 阅读全文
posted @ 2013-04-19 14:37 bo_jwolf 阅读(156) 评论(0) 推荐(0) 编辑
摘要: E - Networking#include<iostream> #include<algorithm> using namespace std; const int maxn=2000; struct node { int x,y,value; int flag; }edge[maxn]; int fa[maxn]; int find(int x) { return x==fa[x]?x:find(fa[x]); } bool cmp(node a,node b) { return a.value<b.value; } int main() { int m,n, 阅读全文
posted @ 2013-04-19 14:04 bo_jwolf 阅读(166) 评论(0) 推荐(0) 编辑