package link;
public class link {
int number;
int[] forlink=new int[200];
int[] tolink=new int[200];
int s,linknumber;
int[] point=new int[200];
int[] check=new int[200];
void makedata(){
fast();
int ch,mode;
mode=0;
while(mode<50){
ch=0;
for(s=1;s<number+1;s++){
if(check[s]<50)ch=100;
}
if(ch<50)mode=100;
for(s=1;s<number+1;s++){
if(check[s]<50)search(s);
}
}
}
void search(int s){
int sx,c1,c2,tx;
int h;
c1=0;
for(sx=1;sx<linknumber+1;sx++){
if(forlink[sx]==s)c1=c1+1;
}
c2=0;
for(sx=1;sx<linknumber+1;sx++){
h=0;
if(forlink[sx]==s)h=h+1;
tx=tolink[sx];
if(check[tx]>50)h=h+1;
if(h==2)c2=c2+1;
}
if(c1==c2)check[s]=100;
int p1;
p1=0;
for(sx=1;sx<linknumber+1;sx++){
tx=tolink[sx];
if(forlink[sx]==s)p1=p1+point[tx];
}
point[s]=p1+1;
}
void fast(){
int s,sx;
for(s=1;s<number+1;s++){
check[s]=100;
point[s]=1;
}
for(s=1;s<linknumber+1;s++){
sx=forlink[s];
check[sx]=0;
}
}
}
最終更新:2013年10月06日 17:13