import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { static class struct { private long fval=0; private long Sval =0; struct ( long j , long h ){ this.fval=j; this.Sval=h; } } static long largestValue(int[] A) { struct [] ff = new struct[(int ) Math.pow(A.length,A.length)]; // Return the largest value of any of A's nonempty subarrays. int i =0; for (int k=0;k