文章
6
粉丝
0
获赞
23
访问
875
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
struct node{
int x,y;
double val;
}edge[4955];
int father[105];
double ax[105];
double ay[105];
int find(int u)
{
if(u==father[u]) return u;
father[u]=find(father[u]);
return father[u];
}
int cmp(const void*a,const void*b)
{
struct node pa=*(struct node*)a;
struct node pb=*(struct node*)b;
if(pa.val<pb.val) return -1;
else if(pa.val>pb.val) return 1;
else return 0;
}
int main()
{
int n;
while(scanf("%d",&n)!=EOF)
{
for(int i=0;i<n;i++)
{
 ...
登录后发布评论
暂无评论,来抢沙发