solve maxmize mean