public int[] howManyReveals(int[] prices) {
		int length = prices.length;
		int[] longest = new int[length];
		int[] ways = new int[length];
		longest[0] = 1;
		ways[0] = 1;
		
		int total_max = longest[0];
		for(int i = 1;i < length;i++){
			int maxx = 0;
			for(int j = 0;j < i;j++){
				if(prices[j] <= prices[i])
					maxx = Math.max(maxx, longest[j]);
			}
			for(int j = 0;j < i;j++){
				if(longest[j] == maxx && prices[j] <= prices[i])
					ways[i] += ways[j];
			}
			ways[i] = ways[i] == 0?1:ways[i];
			longest[i] = (maxx==0?1:maxx+1);
			total_max = Math.max(total_max, longest[i]);
		}
		int[] answer = new int[2];
		int count = 0;
		for(int i = 0;i < length;i++)
			if(longest[i] == total_max)
				count += ways[i];
		answer[0] = total_max;
		answer[1] = count;
		return answer;
	}