C. Longest Good Array