import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

/**
 * Checker for NEERC'2011 Problem D: Dictionary Size.
 */
public class Check implements Checker {
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        long pa = ouf.nextLong();
        long ja = ans.nextLong();
        if (!ouf.seekEoF())
            throw new Outcome(Outcome.Type.PE, "extra information in the output file");
        if (pa != ja)
            throw new Outcome(Outcome.Type.WA, String.format("%d instead of %d", pa, ja));
        return new Outcome(Outcome.Type.OK, String.format("%d", pa));
    }
}
 
import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

/**
 * Checker for NEERC'2011 Problem D: Dictionary Size.
 */
public class Check implements Checker {
    public Outcome test(InStream inf, InStream ouf, InStream ans) {
        long pa = ouf.nextLong();
        long ja = ans.nextLong();
        if (!ouf.seekEoF())
            throw new Outcome(Outcome.Type.PE, "extra information in the output file");
        if (pa != ja)
            throw new Outcome(Outcome.Type.WA, String.format("%d instead of %d", pa, ja));
        return new Outcome(Outcome.Type.OK, String.format("%d", pa));
    }
}
