import java.util.*; public class MarbleMadness { public static void main(String[] args) { new MarbleMadness(new Scanner(System.in)); } // Solve the tower case int oo = 987654321; int solve(int N, int[] vs) { int full = (1<<3)-1; int[][] dp = new int[N+1][1<<3]; for (int i=0; i 2) { for (int v : vs) cost += 2*v; int[] nxt = new int[N-2]; for (int i=1; i