アットウィキロゴ

uy

package neko;
import java.io.*;
 
public class pro {
 
       int s,datanumber;
    String[] data=new String[36000];
 
  String[] name=new String[36000];
  String[] code=new String[50000];
 
  String[] name_t=new String[36000];
  String[] code_t=new String[50000];
 
   String[] name_sa=new String[36000];
  String[] code_sa=new String[50000];
 
    String[] name_s=new String[36000];
  String[] code_s=new String[50000];
 
  int[][] point=new int[6000][5];
 
  int number;
  int number_t;
  int number_s;
 
    public static void main(String[] args) {
       pro te=new pro();
    }
    pro(){
 
readx("datax.csv");        
 
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
name[s-1]=x[4];
code[s-1]="A";
if(x.length>5)code[s-1]=x[5];
} 
 
number=datanumber-1;
 
System.out.println(number);
 
readx("tamo.csv");        
 
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
name_t[s-1]="";
if(x.length>3)name_t[s-1]=x[3];
code_t[s-1]="B";
if(x.length>4)code_t[s-1]=x[4];
} 
 
number_t=datanumber-1;
 
System.out.println(number_t);
 
readx("s.csv");        
 
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
name_t[s-1]="";
if(x.length>3)name_s[s-1]=x[3];
code_t[s-1]="S";
if(x.length>4)code_s[s-1]=x[4];
 
} 
 
number_s=datanumber-1;
 
System.out.println(number_s);
 
 
readx("sa.csv");        
 
for(s=2;s<datanumber+1;s++){
String[] x=data[s].split(",");
name_sa[s-1]="";
if(x.length>5)name_sa[s-1]=x[5];
code_sa[s-1]="SA";
if(x.length>6)code_sa[s-1]=x[6];
 
} 
 
int number_sa=datanumber-1;
 
System.out.println(number_sa);
 
 
int sx;
for(s=1;s<number+1;s++){
int h=0;
for(sx=1;sx<number_t+1;sx++){
if(code[s].equals(code_t[sx]))h=100;
}  
if(h>50)point[s][1]=100;
}
 
 
for(s=1;s<number+1;s++){
int h=0;
for(sx=1;sx<number_s+1;sx++){
if(code[s].equals(code_s[sx]))h=100;
}  
if(h>50)point[s][2]=100;
}
 
for(s=1;s<number+1;s++){
int h=0;
for(sx=1;sx<number_sa+1;sx++){
if(code[s].equals(code_sa[sx]))h=100;
}  
if(h>50)point[s][3]=100;
}
 
for(s=1;s<number+1;s++){
int h=0;
if(point[s][1]>50)h=h+1;
if(point[s][2]>50)h=h+1;
if(point[s][3]>50)h=h+1;
if(h==3)System.out.println(name[s]+","+code[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月06日 02:02