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

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

public class CProcessorFactory extends AbstractProcessorFactory<CInput, COutputEntry> {
    public CProcessorFactory(String inputFileName) {
	super(inputFileName);
    }

    @Override
    protected InputBlockParser<CInput> createInputBlockParser() {
	return new CInputBlockParser();
    }

    @Override
    protected OutputProducer<CInput, COutputEntry> createOutputProducer() {
	return new COutputProducer();
    }
}

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package recyclednumbers;

/**
 *
 * @author vandit
 */
public class Pair {

    private String number1;
    private String number2;

    public Pair(String no1, String no2) {
        number1 = no1;
        number2 = no2;
    }

    @Override
    public boolean equals(Object temp1) {
        boolean ans = false;
        Pair temp = (Pair) temp1;
        if (temp.number1.equals(number1)) {
            if (temp.number2.equals(number2)) {
                ans = true;
            }
        } else if (temp.number1.equals(number2)) {
            if (temp.number2.equals(number1)) {
                ans = true;
            }

        }
        return ans;
    }
@Override
    public int hashCode() {
        return number1.length() + number2.length();
    }
}
