package p4;
import tool.*;
public class pro {
int s,datanumber;
String[] data=new String[50000];
int[] y1=new int[50000];
int[] m1=new int[50000];
int[] y2=new int[50000];
int[] m2=new int[50000];
String[] week=new String[50000];
int[] code=new int[50000];
String[] title=new String[50000];
String[] sta=new String[50000];
String[] artist=new String[500000];
String[] codex=new String[500000];
int[] code_tv=new int[500000];
int number;
int[] point=new int[50000];
String[] t=new String[50000];
public static void main(String[] args) {
pro t=new pro();
}
pro(){
readfile sub=new readfile();
sub.makedata("data.csv","UTF-8");
data=sub.data;
datanumber=sub.datanumber;
for(s=1;s<datanumber;s++){
String[] x=data[s+1].split(",");
y1[s]=num_int(x[4]);
m1[s]=num_int(x[5]);
y2[s]=num_int(x[6]);
m2[s]=num_int(x[7]);
week[s]=x[3];
code[s]=num_int(x[1]);
title[s]=x[0];
sta[s]=x[2];
}
int sx=0;
for(s=1;s<datanumber;s++){
if(y1[s]==1995)sx=sx+1;
if(y1[s]==1995)point[sx]=code[s];
if(y1[s]==1995)t[sx]=title[s];
}
int delta=sx;
int tr;
for(tr=1;tr<delta+1;tr++){
artist sub2=new artist();
sub2.makedata(point[tr]);
number=sub2.number;
artist=sub2.artist;
if(number>0) System.out.println(t[tr]+","+artist[1]);
if(number==0) System.out.println(t[tr]);
}
}
int num_int(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
}
package p4;
import tool.readfile;
public class artist {
int s,datanumber;
String[] data=new String[50000];
int[] y1=new int[50000];
int[] m1=new int[50000];
int[] y2=new int[50000];
int[] m2=new int[50000];
String[] week=new String[50000];
int[] code=new int[50000];
String[] title=new String[50000];
String[] sta=new String[50000];
String[] artist=new String[500000];
String[] codex=new String[500000];
int[] code_tv=new int[500000];
int number;
void makedata(int codex){
readfile sub2=new readfile();
sub2.makedata("artist.csv","UTF-8");
data=sub2.data;
datanumber=sub2.datanumber;
int sx=0;
for(s=1;s<datanumber;s++){
String[] x=data[s+1].split(",");
int n1=0;
if(x.length>1)n1=num_int(x[1]);
if(n1==codex)sx=sx+1;
if(n1==codex)artist[sx]=x[2];
}
number=sx;
}
int num_int(String str){
int nx;
nx=0;
try{
nx=Integer.parseInt(str);
}catch (Exception e) {}
return nx;
}
}
最終更新:2017年07月11日 04:16