public static int dp(int s, int e, boolean t) {
		if (s > e)
			return 0;
		if (dp[s][e] != INF)
			return dp[s][e];
		int max = 0;
		if (!t) {
			if (v[s] < v[e])
				max = dp(s, e - 1, !t);
			else
				max = dp(s + 1, e, !t);
		} else
			max = Math.max(dp(s, e - 1, !t) + v[e], dp(s + 1, e, !t) + v[s]);
		return dp[s][e] = max;
	}