static int runTestCase(int casenum__) {
		switch (casenum__) {
		case 0: {
			int[] Y = { 1, 4, -1, 2 };
			int[] query = { -2, -1, 0, 1 };
			int[] expected__ = { 0, 1, 2, 3 };

			return verifyCase(casenum__, expected__, new PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		}
		case 1: {
			int[] Y = { 0, 0 };
			int[] query = { -1, 0, 1 };
			int[] expected__ = { 0, -1, 0 };

			return verifyCase(casenum__, expected__, new PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		}
		case 2: {
			int[] Y = { 2, 4, 8, 0, 3, -6, 10 };
			int[] query = { 0, 1, 2, 3, 4, 0, 65536 };
			int[] expected__ = { 3, 4, 5, 4, 3, 3, 0 };

			return verifyCase(casenum__, expected__, new PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		}
		case 3: {
			int[] Y = { -178080289, -771314989, -237251715, -949949900, -437883156, -835236871, -316363230, -929746634,
					-671700962 };
			int[] query = { -673197622, -437883156, -251072978, 221380900, -771314989, -949949900, -910604034,
					-671700962, -929746634, -316363230 };
			int[] expected__ = { 8, 6, 3, 0, 7, 1, 4, 8, 3, 4 };

			return verifyCase(casenum__, expected__, new PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		}

		// custom cases

		/*
		 * case 4: {
		 * int[] Y = ;
		 * int[] query = ;
		 * int[] expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		 * }
		 */
		/*
		 * case 5: {
		 * int[] Y = ;
		 * int[] query = ;
		 * int[] expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		 * }
		 */
		/*
		 * case 6: {
		 * int[] Y = ;
		 * int[] query = ;
		 * int[] expected__ = ;
		 * 
		 * return verifyCase(casenum__, expected__, new
		 * PiecewiseLinearFunctionDiv2().countSolutions(Y, query));
		 * }
		 */
		default:
			return -1;
		}
	}