static int runTestCase(int casenum__) {
		switch (casenum__) {
		case 0: {
			String[] isFriend = { "NYN", "YNY", "NYN" };
			int d = 10;
			int expected__ = 20;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 1: {
			String[] isFriend = { "NN", "NN" };
			int d = 1;
			int expected__ = -1;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 2: {
			String[] isFriend = { "NNYNNN", "NNYNNN", "YYNYNN", "NNYNYY",
					"NNNYNN", "NNNYNN" };
			int d = 1000;
			int expected__ = 3000;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 3: {
			String[] isFriend = { "NNYN", "NNNY", "YNNN", "NYNN" };
			int d = 584;
			int expected__ = -1;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 4: {
			String[] isFriend = { "NYNYYYN", "YNNYYYN", "NNNNYNN", "YYNNYYN",
					"YYYYNNN", "YYNYNNY", "NNNNNYN" };
			int d = 5;
			int expected__ = 20;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 5: {
			String[] isFriend = { "NYYNNNNYYYYNNNN", "YNNNYNNNNNNYYNN",
					"YNNYNYNNNNYNNNN", "NNYNNYNNNNNNNNN", "NYNNNNYNNYNNNNN",
					"NNYYNNYNNYNNNYN", "NNNNYYNNYNNNNNN", "YNNNNNNNNNYNNNN",
					"YNNNNNYNNNNNYNN", "YNNNYYNNNNNNNNY", "YNYNNNNYNNNNNNN",
					"NYNNNNNNNNNNNNY", "NYNNNNNNYNNNNYN", "NNNNNYNNNNNNYNN",
					"NNNNNNNNNYNYNNN" };
			int d = 747;
			int expected__ = 2988;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}
		case 6: {
			String[] isFriend = { "NY", "YN" };
			int d = 0;
			int expected__ = 0;

			return verifyCase(casenum__, expected__,
					new Egalitarianism().maxDifference(isFriend, d));
		}

		// custom cases

		/*
		 * case 7: { String[] isFriend = ; int d = ; int expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * Egalitarianism().maxDifference(isFriend, d)); }
		 */
		/*
		 * case 8: { String[] isFriend = ; int d = ; int expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * Egalitarianism().maxDifference(isFriend, d)); }
		 */
		/*
		 * case 9: { String[] isFriend = ; int d = ; int expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * Egalitarianism().maxDifference(isFriend, d)); }
		 */
		default:
			return -1;
		}
	}