import java.io.*;
class author{
String file;
String str,str1,str2;
String[] data=new String[500];
String[] author=new String[5000];
String[] title=new String[5000];
String[] dic=new String[5000];
int dicnumber;
int[] point=new int[5000];
int s,page,h;
public static void main(String [] args) {
author test=new author();
}
author(){
for(page=1;page<3000;page++){
file="memo/";
file=file+page;
file=file+".txt";
readfile(file);
author[page]=data[1];
title[page]=data[2];
h=0;
if(data[3].equals("不明"))h=100;
if(data[3].equals("合格"))h=100;
if(data[3].equals("悪に視"))h=100;
if(data[3].length()>4)h=100;
if(h<50)point[page]=Integer.parseInt(data[3]);
if(h>50)point[page]=-1;
}
for(page=1;page<3000;page++){
h=0;
for(s=1;s<dicnumber+1;s++){
if(author[page].equals(dic[s]))h=100;
}
if(author[page].equals("不明"))h=100;
if(h<50)dicnumber=dicnumber+1;
if(h<50)dic[dicnumber]=author[page];
}
}
void readfile(String file){
String str;
BufferedReader br;
s=0;
try {
br = new BufferedReader(new InputStreamReader(new FileInputStream(file),"SJIS"));
while((str = br.readLine()) != null) {
s=s+1;
data[s]=str;
}
br.close();
} catch (IOException e) {System.out.println(e);}
}
}
最終更新:2011年07月09日 03:24