package souma;
import tool.readfile;
public class pro {
int datanumber;
String[] [[data]]=new String[50000];
String[] [[sta]]=new String[50000];
int[] code=new int[50000];
String[] title=new String[50000];
String[] week=new String[50000];
int number;
int[] y1=new int[5000];
int[] m1=new int[5000];
int[] y2=new int[5000];
int[] m2=new int[5000];
int[] point=new int[500];
public static void main(String[] args) {
pro rsd=new pro();
}
pro(){
String z="週,月,火,水,木,金,土,日";
String[] w=z.split(",");
String z5="放送局,日本,tbs,フジ,朝日,東京";
String[] q=z5.split(",");
readfile sub2=new readfile();
sub2.makedata("data.csv","UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
int s;
[[for]](s=1;s<datanumber;s++){
String[] x=data[s+1].split(",");
sta[s]=x[0];
title[s]=x[7];
code[s]=num_int(x[6]);
week[s]=x[5];
y1[s]=num_int(x[1]);
m1[s]=num_int(x[2]);
y2[s]=num_int(x[3]);
m2[s]=num_int(x[4]);
}
String s1="tbs";
int tr;
for(tr=1;tr<6;tr++){
int ww;
for(ww=1;ww<8;ww++){
for(s=1;s<480;s++){
point[s]=0;
}
int sx;
for(s=1;s<datanumber;s++){
int h=0;
if(sta[s].equals(q[tr]))h=h+1;
if(week[s].equals(w[ww]))h=h+1;
if(e(72,code[s])>50)h=h+1;
int z1=12*(y1[s]-1980)+m1[s];
if(z1<0)z1=1;
int z2=12*(y2[s]-1980)+m2[s];
for(sx=z1;sx<z2+1;sx++){
if(h==3)point[sx]=point[sx]+1;
}
}
int yy=1979;
int mm=12;
for(s=1;s<12*37+1;s++){
mm=mm+1;
if(mm>12)yy=yy+1;
if(mm>12)mm=1;
int h=0;
if(point[s]==1)h=100;
if(h<50)System.out.println(q[tr]+","+yy+","+mm+","+w[ww]+","+point[s]);
}
}
}
}
int num_int(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
int e(int tt,int ee){
int e1=0;
if(tt==8)e1=e8(ee);
if(tt==9)e1=e9(ee);
if(tt==101)e1=e101(ee);
if(tt==102)e1=e102(ee);
if(tt==71)e1=e71(ee);
if(tt==72)e1=e72(ee);
return e1;
}
int e8(int ee){
int z=0;
if(ee==728)z=100;
if(ee==8)z=100;
if(ee==89)z=100;
if(ee==891)z=100;
if(ee==78)z=100;
if(ee==789)z=100;
return z;
}
int e9(int ee){
int z=0;
if(ee==9)z=100;
if(ee==89)z=100;
if(ee==910)z=100;
if(ee==9101)z=100;
if(ee==789)z=100;
return z;
}
int e10(int ee){
int z=0;
if(ee==10)z=100;
if(ee==910)z=100;
if(ee==103)z=100;
if(ee==10111)z=100;
if(ee==1011)z=100;
return z;
}
int e101(int ee){
int z=0;
if(ee==101)z=100;
if(ee==10)z=100;
if(ee==910)z=100;
if(ee==9101)z=100;
if(ee==1011)z=100;
if(ee==103)z=100;
if(ee==10111)z=100;
return z;
}
int e102(int ee){
int z=0;
if(ee==10)z=100;
if(ee==910)z=100;
if(ee==102)z=100;
if(ee==10[[211]])z=100;
if(ee==102111)z=100;
if(ee==1011)z=100;
if(ee==103)z=100;
if(ee==10111)z=100;
if(ee==1021112)z=100;
return z;
}
int e72(int ee){
int z=0;
if(ee==72)z=100;
if(ee==7)z=100;
if(ee==627)z=100;
if(ee==67)z=100;
if(ee==728)z=100;
if(ee==78)z=100;
if(ee==789)z=100;
return z;
}
int e71(int ee){
int z=0;
if(ee==671)z=100;
if(ee==67)z=100;
if(ee==627)z=100;
if(ee==6271)z=100;
if(ee==71)z=100;
if(ee==7)z=100;
if(ee==78)z=100;
if(ee==789)z=100;
return z;
}
}
最終更新:2017年12月08日 13:33