Group cohomology via monads or triple cohomology