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();
    }
}


public class JudgeScoreTuple {

	
	private JudgeScores j1;
	private JudgeScores j2;

	public JudgeScoreTuple(JudgeScores j1, JudgeScores j2) {
		this.j1 = j1;
		this.j2 = j2;
	}
	
	public JudgeScores getSurprise(){
		if(this.j1.isSurprising())
			return j1;
		else
			return j2;
	}
	
	public JudgeScores getNonSurprise(){
		if(this.j1.isSurprising())
			return j2;
		else
			return j1;
	}
}
