solved HQC homework 5