/*--------------------------------------------------------------*/
/* ACM ICPC 2011-2012, NEERC                                    */
/* Northern Subregional Contest                                 */
/* St Petersburg, October 29, 2011                              */
/*--------------------------------------------------------------*/
/* Problem J. John's Inversions                                 */
/*                                                              */
/* Original idea         Yury Petrov                            */
/* Problem statement     Dmitry Paraschenko                     */
/* Testset               Dmitry Paraschenko                     */
/*--------------------------------------------------------------*/
/* Solution                                                     */
/*                                                              */
/* Author                Standard                               */
/*--------------------------------------------------------------*/
 
import ru.ifmo.testlib.Checker;
import ru.ifmo.testlib.InStream;
import ru.ifmo.testlib.Outcome;

/**
 * Checker for Northern QF'2011 Problem J: John's Inversions
 * 
 * @author Dmitry Paraschenko
 */
public class Check implements Checker {
	public Outcome test(InStream inf, InStream ouf, InStream ans) {
		long pa = ouf.nextLong();
		if (!ouf.seekEoF()) {
			return new Outcome(Outcome.Type.PE, "More than one token in output");
		}
		long ja = ans.nextLong();
		if (pa != ja) {
			return new Outcome(Outcome.Type.WA, "Expected: " + ja + ", found: " + pa);
		}
		return new Outcome(Outcome.Type.OK, Long.toString(pa));
	}
}
