package com.menzus.gcj._2012.qualification.b;

import com.menzus.gcj.common.InputBlockParser;
import com.menzus.gcj.common.OutputProducer;
import com.menzus.gcj.common.impl.AbstractProcessorFactory;

public class BProcessorFactory extends AbstractProcessorFactory<BInput, BOutputEntry> {
    public BProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<BInput> createInputBlockParser() {
	return new BInputBlockParser();
    }

    @Override
    protected OutputProducer<BInput, BOutputEntry> createOutputProducer() {
	return new BOutputProducer();
    }
}

import java.util.ArrayList;


public class GCJUtils {
public static Long[] getLongArray(ArrayList<String> lines){
	Long[] arrL = new Long[lines.size()];
	for(int i=0;i<lines.size();i++){
		arrL[i] = Long.parseLong(lines.get(i));
	}
	return arrL;
}
public static Long[] getLongArray(String[] lines){
	Long[] arrL = new Long[lines.length];
	for(int i=0;i<lines.length;i++){
		arrL[i] = Long.parseLong(lines[i]);
	}
	return arrL;
}
}
