This is a generalization of a subproblem from a past programming competition that I had trouble with.
Given input $6$ positive integers: $$r_1, r_2, r_3, x_1, x_2, x_3 \in \mathbb{Z^+}$$ Produce as output any $6$ non-negative integers: $$\theta_1, \theta_2, \theta_3, \theta_4, \theta_5, \theta_6$$ with a maximum sum, subject to the constraints: $$\theta_1x_1 + \theta_2x_1 + \theta_3x_2 + \theta_4x_2 + \theta_5x_3 + \theta_6x_3 \le r_1 \\ \theta_1x_2 + \theta_2x_3 + \theta_3x_1 + \theta_4x_3 + \theta_5x_1 + \theta_6x_2 \le r_2 \\ \theta_1x_3 + \theta_2x_2 + \theta_3x_3 + \theta_4x_1 + \theta_5x_2 + \theta_6x_1 \le r_3. $$