[Homework-ish] Creating a program (c++) that groups 4 variables together one time, prints it out and then creates a new group without repeating matches.

Well it certainly is an interesting problem, and more challenging than I thought. Truth be told, I don't know how to actually go about maximizing the number of days/groups. So what I did instead was really shuffle things around and then try my algorithm over hundreds of trials. It was only able to do 3 full days in two trials:

Trial 146:
Day 1: ( F3 A4 E3 D4 ) ( A2 B4 E4 F1 ) ( F4 C3 D2 C4 ) ( E2 F2 C2 B3 ) ( C1 D3 E1 A1 ) ( A3 B2 B1 D1 ) 
Day 2: ( E3 E1 F1 A1 ) ( A4 D4 D1 C4 ) ( A3 D2 B1 C2 ) ( A2 F2 C3 B4 ) ( F3 E2 D3 B3 ) ( F4 B2 C1 E4 ) 
Day 3: ( C2 E2 D2 E3 ) ( A4 A1 B3 C4 ) ( A2 B2 E4 D4 ) ( A3 B1 D1 F1 ) ( D3 E1 C1 F4 ) ( F2 C3 B4 F3 ) 
DONE

Trial 440:
Day 1: ( C4 C3 D4 E3 ) ( F3 A4 E2 D1 ) ( A3 A2 B2 C1 ) ( F2 C2 A1 F4 ) ( D2 B3 B1 E4 ) ( B4 F1 E1 D3 ) 
Day 2: ( B3 F4 B4 E4 ) ( A3 E1 E2 D3 ) ( A4 D1 E3 C1 ) ( F3 C2 C3 F2 ) ( A2 F1 B1 B2 ) ( D2 A1 D4 C4 ) 
Day 3: ( E4 A4 D3 C1 ) ( B4 F1 E1 F3 ) ( A3 D4 E3 B1 ) ( D1 D2 F4 C3 ) ( A2 E2 B2 A1 ) ( C4 B3 C2 F2 ) 
DONE

I can post my code if you want, but it is pretty sloppy TBH.

/r/learnprogramming Thread Parent