Asymptotics for the partial sum and its maximum of dependent random variables*