 This is a randomized, three-part, open-label trial of grazoprevir MK-5172 100 mg and uprifosbuvir MK-3682 300 mg or 450 mg, with either elbasvir MK-8742 50 mg or ruzasvir MK-8408 60 mg, and with or without ribavirin RBV, in treatment-naïve TN and treatment-experienced TE cirrhotic C or non-cirrhotic NC hepatitis C virus HCV participants with chronic HCV genotype GT 1 or GT2 infection. Part A will consist of 8 arms to evaluate the safety of dose combinations. In Part B, participants will take 2 uprifosbuvir grazoprevir ruzasvir fixed dose combination FDC tablets once daily q.d. by mouth, with or without twice-daily b.i.d. RBV 200 mg capsules; weight-based dosing. Participants who relapse following completion of therapy in Part A will be offered the option of retreatment with 16 weeks of uprifosbuvir grazoprevir ruzasvir with RBV in Part C data obtained from Part C will not be used in the analysis of outcome measures. 