class Solution {
public:
    /**
     * 最大乘积
     * @param A int整型一维数组 
     * @param ALen int A数组长度
     * @return long长整型
     */
    long long solve(int* A, int ALen) {
        // write code here
        sort(A, A + ALen);

        long long a = A[ALen-1] * A[ALen-2] * A[ALen-3];
        long long b = A[ALen-1] * A[ALen-2] * A[0];
        cout << "b " << b << endl;
        long long c = A[0] * A[1] * A[ALen-1];
        return max(max(a,b),c);
    }
};