public int solve(int L, int[] x) {
		int[] maxa = new int[x.length], between = new int[x.length];
		int max = 0, maxb = 0;
		for (int i = 0; i < x.length; i++) {
			if (x[i] < L - x[i])
				maxa[i] = L - x[i];
			else
				maxa[i] = x[i];
		}
		for (int i = 0; i < maxa.length; i++) {
			if (maxa[i] > max)
				max = maxa[i];

		}
		return max;
	}