アットウィキロゴ

yagyuu

package tv8;
 
import java.io.*;
 
public class pro {
 
     int s,datanumber;
    String[] data=new String[5000];
  String[] sta=new String[500];
  String[] link=new String[500];
   String[] name=new String[500];
  String[] dic_sta=new String[5000];
  String[] dic_link=new String[5000];
   String[] dic_name=new String[5000];
 
    public static void main(String[] args) {
        pro te=new pro();
    }
    pro(){
        int dicnumber=0;
 
        int tr;
        for(tr=1;tr<264;tr++){
        readx("data/"+tr+".txt");
 
        for(s=1;s<datanumber+1;s++){   
        String[] x=data[s].split(",");
        sta[s]=x[0];
        name[s]=x[3];
        link[s]=x[4];
 
        }
 
        int sx;
         for(s=1;s<datanumber+1;s++){
     int h=0;
 for(sx=0;sx<dicnumber+1;sx++){
 if(link[s].equals(dic_link[sx]))h=100;
 }    
 if(h<60)dicnumber=dicnumber+1;
 if(h<60)dic_link[dicnumber]=link[s];
 if(h<60)dic_name[dicnumber]=name[s];
  if(h<60)dic_sta[dicnumber]=sta[s];
  }
 
    }
 
 
     for(s=1;s<dicnumber+1;s++){    
        System.out.println(dic_sta[s]+","+dic_name[s]+","+dic_link[s]);
    }
 
 
 
 
    }
    void readx(String file){
 
String str;
BufferedReader br;  
int s;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8"));  
while((str = br.readLine()) != null) {  
s=s+1;
data[s]=str;  
}
br.close();
} catch (IOException e) {System.out.println(e);}  
 
datanumber=s;
 
} 
 
 
}
 
最終更新:2016年09月05日 04:49