Mrs. Knuth - Part III
Statement
Goal
This puzzle is part 3 of a multi-part Algorithm X tutorial and is meant to be done per the guidance in the following playground:You are free to solve this puzzle in any language you choose. While the playground demonstrations are written in Python, a reusable Algorithm X Solver is available in many different languages. By following the guidance in the playground and using the solver as intended, this puzzle should be much easier than attempting it from scratch.
Task Overview:
Mrs. Knuth has received some wonderful news! This summer, she will only be working with a handful of honor students. Although she'll have fewer students, each student is now allowed to request multiple hours of instruction per week. This creates a situation where many potential schedules exist. Based on her preferences, Mrs. Knuth needs you to find the best schedule possible.
Schedule Score Calculation:
The school math teacher, Mrs. Ruth, worked with Mrs. Knuth to develop the following scoring system to compare one schedule option to another. (High scores are better than low scores.)
Free Time: Continuous free time is more valuable than broken up chunks of free time. Any single hour of free time, including LUNCH, gets 2 points. However, 2 or more continuous hours of free time gets points calculated as 2 ^ (numberContinuousFreeHours). e.g. 5 continuous free hours gets 2 ^ 5 = 32 points. On the other hand, if Mrs. Knuth had lessons on some particular day at 9, 11, 1 and 3, she would still have 5 free hours during the day, but since each of those free hours would be standalone hours, the continuousFreeTimeScore for that day would be only 10 (2 + 2 + 2 + 2 + 2).
Loud Instruments: Mrs. Knuth prefers to teach loudInstruments during the morning hours whenever possible. Loud instruments taught during morning hours (
Scheduling: Mrs. Knuth's energy wanes as the week progresses. She prefers having lesson early in the week as compared to late in the week. She also prefers teaching in the morning whenever possible.
Every student must be put on the schedule a number of times equal to that student's numHoursRequested. Each student placement on the schedule gets points determined by the day of the week and whether the placement was in the morning or the afternoon. Points for morning lessons (in order from Monday to Friday) are
Alphabetical Order: Mrs. Knuth's oddities are well known, so it should not be a shock that she prefers her daily students to be in alphabetical order. Consider each day of the week independently. Create a list of students from the beginning of the day to the end of the day, ignoring all free time. For each pair of contiguous students, if those students are in ascending alphabetical order, 15 points are awarded. A day that has only one lesson receives 0 points since there are no two student names to compare. A full day, with 8 students, could have up to 7 * 15 = 105 points.
Mrs. Ruth has been a tremendous help to Mrs. Knuth, but creating a scoring system to determine a best score might be an evolving process. Because of that, Mrs. Knuth has made one last request. After you display the best schedule, she would like you to "show your work" in regards to your calculations. This will help her see how her scoring system works which might help her make future improvements.
After displaying the best schedule, you must display 4 calculationDetailStrings (one for each category above) and, finally, the bestScheduleScore. A calculationDetailString must be in the following format:
mondayScore
The bestScheduleScore is the sum of its four weeklyScores.
All of Mrs. Knuth's previous requests must still be honored:
• No single instrument shall be taught more than one hour per day.
• No two loudInstruments shall be scheduled in back-to-back hours.
• troublesomePairs shall not be scheduled back-to-back.
All notes about INPUT and OUTPUT formatting still apply to Part III. For details, see Part I or Part II located here:
Input
Line 1: Mrs. Knuth’s teacherAvailability
Line 2: An integer numStudents
Next numStudents lines: name instrument numHoursRequested studentAvailability
Next Line: An integer numTroublesomePairs
Next numTroublesomePairs lines: name1 name2
Line 2: An integer numStudents
Next numStudents lines: name instrument numHoursRequested studentAvailability
Next Line: An integer numTroublesomePairs
Next numTroublesomePairs lines: name1 name2
Output
10 lines: schedule per the rules detailed in Part I and Part II. Trailing spaces must be removed from each line.
Line 11: Blank line.
Line 12: continuousFreeTimeCalculationDetails per the calculationDetailString specification above.
Line 13: loudInstrumentCalculationDetails per the calculationDetailString specification above.
Line 14: schedulingCalculationDetails per the calculationDetailString specification above.
Line 15: alphabeticalOrderCalculationDetails per calculationDetailString specification rules above.
Line 16: bestScheduleScore
Line 11: Blank line.
Line 12: continuousFreeTimeCalculationDetails per the calculationDetailString specification above.
Line 13: loudInstrumentCalculationDetails per the calculationDetailString specification above.
Line 14: schedulingCalculationDetails per the calculationDetailString specification above.
Line 15: alphabeticalOrderCalculationDetails per calculationDetailString specification rules above.
Line 16: bestScheduleScore
Constraints
• 2 <= length of name <= 4.
• 4 <= length of instrument <= 9.
• The only loudInstruments areTrumpet , Drums and Trombone .
• numStudents <= Mrs. Knuth's available hours per week.
• 0 <= numTroublesomePairs <= 2.
• The two names in a troublesomePair are always different.
• All students have unique names.
• name and instrument do not contain any spaces.
• teacherAvailability and studentAvailability are in the availabilityString format as explained in Goal section and always valid (e.g. no duplicate hours on the same day).
• All lessons consist of 1 student with 1 instrument for 1 hour.
• Mrs. Knuth will be available to teach on at least 1 day and at most 5 days.
• All test cases have a unique solution.
• 4 <= length of instrument <= 9.
• The only loudInstruments are
• numStudents <= Mrs. Knuth's available hours per week.
• 0 <= numTroublesomePairs <= 2.
• The two names in a troublesomePair are always different.
• All students have unique names.
• name and instrument do not contain any spaces.
• teacherAvailability and studentAvailability are in the availabilityString format as explained in Goal section and always valid (e.g. no duplicate hours on the same day).
• All lessons consist of 1 student with 1 instrument for 1 hour.
• Mrs. Knuth will be available to teach on at least 1 day and at most 5 days.
• All test cases have a unique solution.
Example
Input
M 8 Tu 8 W 8 Th 8 F 8 9 10 11 1 3 Drew Trombone 1 M Tu W Th F 10 11 Ella Flute 2 M 8 Tu 8 W Th F 11 Lola Drums 1 M Tu W Th F 11 1 1 Drew Ella
Output
Monday Tuesday Wednesday Thursday Friday
8 Ella/Flute Ella/Flute -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Drew/Trombone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Lola/Drums
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
256+256+512+512+18=1554
0+0+0+0+50=50
15+12+0+0+5=32
0+0+0+0+15=15
1651
Tags
Algorithm X, Exact Cover, Backtracking
Difficulty
Hard
Test cases
2 Lessons per Week for Ella Test
Input
M 8 Tu 8 W 8 Th 8 F 8 9 10 11 1
3
Drew Trombone 1 M Tu W Th F 10 11
Ella Flute 2 M 8 Tu 8 W Th F 11
Lola Drums 1 M Tu W Th F 11 1
1
Drew Ella
Output
Monday Tuesday Wednesday Thursday Friday
8 Ella/Flute Ella/Flute -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Drew/Trombone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Lola/Drums
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
256+256+512+512+18=1554
0+0+0+0+50=50
15+12+0+0+5=32
0+0+0+0+15=15
1651
Validator 1 Validator
Input
M 8 9 Tu 8 W 8 Th 9 10 F 10 11
3
Carl Saxophone 1 M 8 9 Tu W Th F
Maya Clarinet 2 M 9 Tu W Th 10 F 11
Lola Drums 1 M 8 9 Tu W Th F
1
Carl Maya
Output
Monday Tuesday Wednesday Thursday Friday
8 Carl/Saxophone -------------- -------------- -------------- --------------
9 Lola/Drums -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- Maya/Clarinet --------------
11 -------------- -------------- -------------- -------------- Maya/Clarinet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
128+512+512+68+40=1260
50+0+0+0+0=50
30+0+0+6+3=39
15+0+0+0+0=15
1364
3 Lessons per Week for Ella Test
Input
M 8 Tu 8 W 8 Th 8 F 8 9 10 11 1
3
Drew Trombone 1 M Tu W Th F 10 11
Ella Flute 3 M 8 Tu 8 W 8 Th F 11
Lola Drums 1 M Tu W Th F 11 1
1
Drew Ella
Output
Monday Tuesday Wednesday Thursday Friday
8 Ella/Flute Ella/Flute Ella/Flute -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Drew/Trombone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Lola/Drums
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
256+256+256+512+18=1298
0+0+0+0+50=50
15+12+9+0+5=41
0+0+0+0+15=15
1404
Validator 2 Validator
Input
M 8 9 Tu 8 W 8 Th 9 10 1 2 F 10 11 1
3
Carl Saxophone 1 M 8 9 Tu W Th F
Maya Clarinet 3 M 9 Tu W 8 Th 2 F 1
Lola Drums 1 M 8 9 Tu W Th F
1
Carl Maya
Output
Monday Tuesday Wednesday Thursday Friday
8 Carl/Saxophone -------------- Maya/Clarinet -------------- --------------
9 Lola/Drums -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Maya/Clarinet
2 -------------- -------------- -------------- Maya/Clarinet --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
128+512+256+68+40=1004
50+0+0+0+0=50
30+0+9+4+2=45
15+0+0+0+0=15
1114
4 Lessons per Week for Ella Test
Input
M 1 Tu 4 W 4 Th 1 F 8 9 10 11 1
3
Drew Trombone 1 M Tu W Th F 10 11
Ella Flute 4 M 1 Tu 4 W 4 Th 1 F 11
Lola Drums 1 M Tu W Th F 11 1
1
Drew Ella
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Drew/Trombone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Ella/Flute -------------- -------------- Ella/Flute Lola/Drums
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- Ella/Flute Ella/Flute -------------- --------------
40+256+256+40+18=610
0+0+0+0+50=50
10+8+6+4+5=33
0+0+0+0+15=15
708
Validator 3 Validator
Input
M 8 9 Tu 8 W 8 Th 9 10 1 2 F 10 11 1
3
Carl Saxophone 1 M 8 9 Tu W Th F
Maya Clarinet 4 M 9 Tu 8 W 8 Th 2 F 1
Lola Drums 1 M 8 9 Tu W Th F
1
Carl Maya
Output
Monday Tuesday Wednesday Thursday Friday
8 Carl/Saxophone Maya/Clarinet Maya/Clarinet -------------- --------------
9 Lola/Drums -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Maya/Clarinet
2 -------------- -------------- -------------- Maya/Clarinet --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
128+256+256+68+40=748
50+0+0+0+0=50
30+12+9+4+2=57
15+0+0+0+0=15
870
Morning is Better Test
Input
M 1 Tu 8 4 W 8 4 Th 1 F 8 9 10 11 1
3
Drew Trombone 1 M Tu W Th F 10 11
Ella Flute 4 M 1 Tu 8 4 W 8 4 Th 1 F 11
Lola Drums 1 M Tu W Th F 11 1
1
Drew Ella
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- Ella/Flute Ella/Flute -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Drew/Trombone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Ella/Flute -------------- -------------- Ella/Flute Lola/Drums
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
40+256+256+40+18=610
0+0+0+0+50=50
10+12+9+4+5=40
0+0+0+0+15=15
715
Validator 4 Validator
Input
M 8 9 Tu 8 W 8 Th 9 10 1 2 F 10 11 1
3
Carl Saxophone 1 M 8 9 Tu W Th F
Maya Clarinet 4 M 9 Tu 8 W 8 Th 10 2 F 11 1
Lola Drums 1 M 8 9 Tu W Th F
1
Carl Maya
Output
Monday Tuesday Wednesday Thursday Friday
8 Carl/Saxophone Maya/Clarinet Maya/Clarinet -------------- --------------
9 Lola/Drums -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- Maya/Clarinet --------------
11 -------------- -------------- -------------- -------------- Maya/Clarinet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
128+256+256+68+40=748
50+0+0+0+0=50
30+12+9+6+3=60
15+0+0+0+0=15
873
Mornings are Loud Test
Input
M Tu 9 W Th F 1 2
3
Ella Flute 1 M Tu 9 W Th F 1 2
Drew Clarinet 1 M Tu 9 W Th F 1 2
Lola Drums 1 M Tu 9 W Th F 1 2
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- Lola/Drums -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Drew/Clarinet
2 -------------- -------------- -------------- -------------- Ella/Flute
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
512+130+512+512+36=1702
0+50+0+0+0=50
0+12+0+0+4=16
0+0+0+0+15=15
1783
Validator 5 Validator
Input
M Tu 9 W Th F 11 1
3
Carl Trumpet 1 M Tu W Th F 11 1
Drew Clarinet 1 M Tu 9 W Th F 11 1
Maya Flute 1 M Tu W Th F 11 1
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- Drew/Clarinet -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- Carl/Trumpet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- Maya/Flute
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
512+130+512+512+18=1684
0+0+0+0+50=50
0+12+0+0+5=17
0+0+0+0+15=15
1766
Alphabetical Test
Input
M Tu W 8 9 10 2 3 Th F
5
Lola Saxophone 1 M Tu W 8 9 10 2 3 Th F
Ella Flute 1 M Tu W 8 9 10 2 3 Th F
Alma Clarinet 1 M Tu W 8 9 10 2 3 Th F
Drew Tuba 1 M Tu W 8 9 10 2 3 Th F
Amy Baritone 1 M Tu W 8 9 10 2 3 Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- Alma/Clarinet -------------- --------------
9 -------------- -------------- Amy/Baritone -------------- --------------
10 -------------- -------------- Drew/Tuba -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- Ella/Flute -------------- --------------
3 -------------- -------------- Lola/Saxophone -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
512+512+10+512+512=2058
0+0+0+0+0=0
0+0+39+0+0=39
0+0+60+0+0=60
2157
Validator 6 Validator
Input
M 8 9 2 3 4 Tu W Th F
5
Lola Saxophone 1 M 8 9 2 3 4 Tu W Th F
Ella Flute 1 M 8 9 2 3 4 Tu W Th F
Lulu Clarinet 1 M 8 9 2 3 4 Tu W Th F
Carl Tuba 1 M 8 9 2 3 4 Tu W Th F
Ash Baritone 1 M 8 9 2 3 4 Tu W Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 Ash/Baritone -------------- -------------- -------------- --------------
9 Carl/Tuba -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 Ella/Flute -------------- -------------- -------------- --------------
3 Lola/Saxophone -------------- -------------- -------------- --------------
4 Lulu/Clarinet -------------- -------------- -------------- --------------
16+512+512+512+512=2064
0+0+0+0+0=0
60+0+0+0+0=60
60+0+0+0+0=60
2184
Which Day is Better? Test
Input
M 8 9 10 11 4 Tu W 8 9 10 11 2 3 4 Th F
5
Lola Saxophone 1 M 4 Tu W 4 Th F
Ella Flute 1 M 11 4 Tu W 11 4 Th F
Alma Clarinet 1 M 8 9 Tu W 8 9 Th F
Drew Tuba 1 M 10 Tu W 10 Th F
Amy Baritone 1 M 9 Tu W 9 Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 Alma/Clarinet -------------- -------------- -------------- --------------
9 Amy/Baritone -------------- -------------- -------------- --------------
10 Drew/Tuba -------------- -------------- -------------- --------------
11 Ella/Flute -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 Lola/Saxophone -------------- -------------- -------------- --------------
16+512+512+512+512=2064
0+0+0+0+0=0
70+0+0+0+0=70
60+0+0+0+0=60
2194
Validator 7 Validator
Input
M Tu W Th 8 9 10 11 4 F 8 9 10 11 2 3 4
5
Carl Saxophone 1 M Tu W Th 10 11 F 10 11
Lexi Flute 1 M Tu W Th 4 F 4
Josh Clarinet 1 M Tu W Th 11 F 11
Alex Tuba 1 M Tu W Th 8 F 8
Amy Baritone 1 M Tu W Th 8 9 F 8 9
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- Alex/Tuba --------------
9 -------------- -------------- -------------- Amy/Baritone --------------
10 -------------- -------------- -------------- Carl/Saxophone --------------
11 -------------- -------------- -------------- Josh/Clarinet --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- Lexi/Flute --------------
512+512+512+16+512=2064
0+0+0+0+0=0
0+0+0+28+0=28
0+0+0+60+0=60
2152
Maximize Continuous Free Time Test
Input
M 2 Tu 9 W Th F 9 10 11 3 4
3
Ella Saxophone 1 M Tu 9 W Th F 9 10 11 3
Drew Clarinet 1 M Tu 9 W Th F 9 10 11 3 4
Lola Flute 1 M 2 Tu 9 W Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- Lola/Flute -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- Ella/Saxophone
4 -------------- -------------- -------------- -------------- Drew/Clarinet
512+130+512+512+128=1794
0+0+0+0+0=0
0+12+0+0+4=16
0+0+0+0+0=0
1810
Validator 8 Validator
Input
M 2 Tu 9 W Th 9 10 11 3 4 F
3
Carl Flute 1 M Tu 9 W Th 9 10 11 3 4 F
Maya Clarinet 1 M Tu 9 W Th 9 10 11 3 F
Ivy Drums 1 M 2 Tu 9 W Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- Ivy/Drums -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- Maya/Clarinet --------------
4 -------------- -------------- -------------- Carl/Flute --------------
512+130+512+128+512=1794
0+50+0+0+0=50
0+12+0+8+0=20
0+0+0+0+0=0
1864
Continuous Free Time II Test
Input
M Tu W Th F 8 9 10 11 1 2 3 4
2
Ella Trumpet 1 M Tu W Th F 8 10 11 1 2 4
Drew Clarinet 1 M Tu W Th F 8 10 11 1 2 4
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- Ella/Trumpet
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- Drew/Clarinet
512+512+512+512+128=2176
0+0+0+0+50=50
0+0+0+0+5=5
0+0+0+0+0=0
2231
Validator 9 Validator
Input
M Tu 8 9 10 11 1 2 3 4 W Th F
2
Fred Tuba 1 M Tu 8 10 11 1 2 4 W Th F
Sam Clarinet 1 M Tu 8 10 11 1 2 4 W Th F
0
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- Fred/Tuba -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- Sam/Clarinet -------------- -------------- --------------
512+128+512+512+512=2176
0+0+0+0+0=0
0+20+0+0+0=20
0+15+0+0+0=15
2211
Meh Test
Input
M 1 2 Tu 1 2 W 10 11 1 Th 9 10 F 11 1
7
Alma Flute 1 M Tu W 11 Th 10 F 11
Amy Trombone 2 M 1 2 Tu 1 2 W 10 11 1 Th 9 10 F 11 1
Ayla Clarinet 1 M 1 Tu 1 W 11 Th 9 10 F 11
Cora Trombone 1 M Tu W Th F 11 1
Jack Tuba 1 M 1 2 Tu 1 W Th 9 F 11
Joe Flute 3 M 2 Tu W 1 Th 10 F 11
Luke Flute 1 M 2 Tu 1 2 W 11 Th F 11
1
Ayla Luke
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- Amy/Trombone --------------
10 -------------- -------------- Amy/Trombone Joe/Flute --------------
11 -------------- -------------- Ayla/Clarinet -------------- Alma/Flute
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Jack/Tuba -------------- Joe/Flute -------------- Cora/Trombone
2 Joe/Flute Luke/Flute -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
36+68+14+66+18=202
0+0+50+50+0=100
20+8+24+12+5=69
15+0+30+15+15=75
446
Validator 10 Validator
Input
M 3 4 Tu 9 10 11 W 2 3 Th 2 3 F 10 11 1
8
Alex Tuba 2 M 3 Tu 11 W 2 3 Th 2 3 F 11 1
Doug Drums 1 M 3 Tu W 2 Th F
Ivy Flute 1 M Tu 10 W Th 3 F
Joe Clarinet 1 M 3 Tu 11 W 3 Th 2 F
John Flute 1 M 4 Tu W Th F 11
Nora Tuba 1 M Tu 9 10 11 W Th 3 F 11
Rae Trombone 1 M Tu 10 11 W 2 Th F
Ryan Baritone 1 M Tu W 2 Th F 10
1
Joe Ryan
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- Nora/Tuba -------------- -------------- --------------
10 -------------- Rae/Trombone -------------- -------------- --------------
11 -------------- Joe/Clarinet -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 -------------- -------------- Ryan/Baritone Alex/Tuba --------------
3 Doug/Drums -------------- Alex/Tuba Ivy/Flute --------------
4 John/Flute -------------- -------------- -------------- --------------
128+34+66+66+512=806
0+50+0+0+0=50
20+36+12+8+0=76
15+15+0+15+0=45
977
Almost Perfect Schedule Test
Input
M 9 10 11 1 Tu 9 10 11 1 2 3 W 9 10 11 Th F
5
Ben Baritone 1 M 9 1 Tu 10 W 11 Th F
Ella Trombone 2 M 10 11 Tu 9 10 11 1 2 3 W 9 10 11 Th F
Jim Trombone 1 M 1 Tu 10 2 3 W 10 11 Th F
Kai Tuba 2 M 10 Tu 9 10 W 10 11 Th F
Sam Saxophone 1 M 9 1 Tu 1 W Th F
2
Ella Jim
Kai Sam
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 Ben/Baritone Kai/Tuba Ella/Trombone -------------- --------------
10 Kai/Tuba Jim/Trombone -------------- -------------- --------------
11 Ella/Trombone -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Sam/Saxophone -------------- -------------- -------------- --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
12+66+130+512+512=1232
50+50+50+0+0=150
55+24+9+0+0=88
30+0+0+0+0=30
1500
Validator 11 Validator
Input
M 8 9 10 11 1 2 3 4 Tu W 8 9 10 Th 10 11 1 F
4
Adam Baritone 1 M 3 4 Tu W 10 Th 10 F
Bob Saxophone 2 M 9 2 4 Tu W 8 Th 10 11 F
Coop Trombone 2 M 8 9 10 1 2 4 Tu W 8 9 Th 11 1 F
Lily Baritone 2 M 9 Tu W 8 9 10 Th 10 11 1 F
2
Coop Lily
Bob Adam
Output
Monday Tuesday Wednesday Thursday Friday
8 Coop/Trombone -------------- Lily/Baritone -------------- --------------
9 Bob/Saxophone -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- Bob/Saxophone --------------
11 -------------- -------------- -------------- Coop/Trombone --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- Lily/Baritone --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 Adam/Baritone -------------- -------------- -------------- --------------
64+512+256+14+512=1358
50+0+0+50+0=100
40+0+9+16+0=65
0+0+0+30+0=30
1553
Emma, We Need to Chat Test
Input
M Tu 10 11 1 2 W Th 9 10 11 F 2 3 4
4
Ella Baritone 2 M Tu 10 11 1 W Th 10 11 F 2 3
Emma Flute 3 M Tu 10 11 1 2 W Th 9 10 11 F 2 3 4
Jack Saxophone 2 M Tu 10 11 1 2 W Th 9 10 11 F 2 3 4
Zoey Tuba 1 M Tu 1 W Th 9 10 11 F 2 3
2
Emma Ella
Jack Zoey
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- Emma/Flute --------------
10 -------------- Ella/Baritone -------------- Jack/Saxophone --------------
11 -------------- Jack/Saxophone -------------- Ella/Baritone --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Zoey/Tuba -------------- -------------- --------------
2 -------------- Emma/Flute -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- Emma/Flute
512+10+512+34+256=1324
0+0+0+0+0=0
0+40+0+18+2=60
0+30+0+15+0=45
1429
Validator 12 Validator
Input
M 8 9 10 11 1 2 3 Tu W Th 10 11 1 F 8 9 10 11 1 2
4
Isla Flute 2 M 9 10 Tu W Th 11 F 8
Jim Saxophone 3 M 9 10 1 3 Tu W Th 1 F 10
Liam Trombone 2 M 8 11 1 2 Tu W Th 11 1 F 8 9 10 2
Nora Trumpet 1 M 8 9 10 Tu W Th 10 1 F 11
2
Isla Jim
Liam Nora
Output
Monday Tuesday Wednesday Thursday Friday
8 Liam/Trombone -------------- -------------- -------------- Isla/Flute
9 Jim/Saxophone -------------- -------------- -------------- Liam/Trombone
10 -------------- -------------- -------------- Nora/Trumpet Jim/Saxophone
11 -------------- -------------- -------------- Isla/Flute --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- Jim/Saxophone --------------
2 -------------- -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
128+512+512+14+64=1230
50+0+0+50+50=150
30+0+0+16+9=55
0+0+0+15+15=30
1465
4-Day Weekends! Test
Input
M 8 9 Tu 10 11 W 11 1 2 3 4 Th 8 9 10 F 9 10
6
Anna Flute 2 M Tu 11 W 3 Th 10 F
Drew Trumpet 1 M Tu 10 W 4 Th 8 10 F 9
Emma Saxophone 1 M 8 9 Tu W 1 3 Th 9 F
Luna Flute 1 M Tu W 11 1 Th 8 9 10 F 9
Mia Clarinet 3 M 8 9 Tu 10 11 W 11 1 2 3 4 Th 9 10 F 9 10
Noah Tuba 1 M Tu 10 W 4 Th F 10
1
Noah Anna
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- Drew/Trumpet --------------
9 -------------- -------------- -------------- Mia/Clarinet --------------
10 -------------- Mia/Clarinet -------------- Anna/Flute --------------
11 -------------- Anna/Flute -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- Luna/Flute -------------- --------------
2 -------------- -------------- Mia/Clarinet -------------- --------------
3 -------------- -------------- Emma/Saxophone -------------- --------------
4 -------------- -------------- Noah/Tuba -------------- --------------
512+36+32+64+512=1156
0+0+0+50+0=50
0+24+24+18+0=66
0+0+30+15+0=45
1317
Validator 13 Validator
Input
M 1 2 3 Tu 10 11 W 8 9 10 11 Th 8 9 F 2 3 4
5
Bob Saxophone 2 M 1 Tu W 9 10 Th 8 9 F
Josh Clarinet 2 M 3 Tu W 9 Th 9 F 3
Joy Flute 3 M 1 3 Tu 10 11 W 8 10 Th 8 9 F 2 3 4
Liam Drums 2 M 1 Tu 10 W 8 9 Th F 3
Sam Baritone 1 M 2 3 Tu W 8 9 10 Th F 3
1
Joy Bob
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- Joy/Flute Bob/Saxophone --------------
9 -------------- -------------- Liam/Drums Josh/Clarinet --------------
10 -------------- -------------- Bob/Saxophone -------------- --------------
11 -------------- -------------- -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Liam/Drums -------------- -------------- -------------- --------------
2 Sam/Baritone -------------- -------------- -------------- --------------
3 Joy/Flute -------------- -------------- -------------- Josh/Clarinet
4 -------------- -------------- -------------- -------------- Joy/Flute
34+512+64+128+128=866
0+0+50+0+0=50
30+0+27+12+4=73
15+0+15+15+15=60
1049
3-Day Weekends! Test
Input
M 9 10 11 1 Tu 11 1 2 W 2 3 4 Th 11 1 2 3 4 F 11 1 2 3 4
6
Cole Clarinet 2 M Tu 11 W 2 Th 2 F 1
Izzy Drums 2 M 10 Tu 1 W 2 4 Th 11 1 4 F 1 2
Liam Trombone 2 M 10 11 1 Tu W 2 Th 11 1 F 4
Lola Trumpet 1 M 10 Tu W 3 Th F 11 2 3
Mike Baritone 2 M Tu 11 W 3 4 Th 4 F
Olly Clarinet 2 M Tu 2 W 3 4 Th 1 4 F 1 2 3
2
Mike Cole
Izzy Olly
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- Mike/Baritone -------------- Izzy/Drums Lola/Trumpet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- Liam/Trombone Cole/Clarinet
2 -------------- Olly/Clarinet -------------- Cole/Clarinet Izzy/Drums
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- Olly/Clarinet Mike/Baritone Liam/Trombone
512+16+256+12+12=808
0+0+0+50+50=100
0+20+6+18+9=53
0+15+0+30+30=75
1036
Validator 14 Validator
Input
M Tu 9 10 11 1 W 10 11 1 2 3 Th F 8 9 10 11 1
5
Adam Trumpet 2 M Tu 11 W Th F 8 11 1
Bob Clarinet 2 M Tu 9 10 11 W 10 1 2 3 Th F 9 10 11 1
Drew Trombone 2 M Tu 9 11 1 W 11 3 Th F 9 10 11 1
Ivy Flute 3 M Tu 9 10 11 1 W 10 1 2 Th F 8
Jack Baritone 1 M Tu 9 10 1 W 3 Th F
2
Ivy Adam
Drew Jack
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- Ivy/Flute
9 -------------- Drew/Trombone -------------- -------------- Drew/Trombone
10 -------------- Bob/Clarinet -------------- -------------- Bob/Clarinet
11 -------------- Adam/Trumpet -------------- -------------- Adam/Trumpet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Ivy/Flute -------------- -------------- --------------
2 -------------- -------------- Ivy/Flute -------------- --------------
3 -------------- -------------- Jack/Baritone -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
512+12+66+512+32=1134
0+100+0+0+100=200
0+44+12+0+12=68
0+15+15+0+0=30
1432
Let's Rethink This Ivy Test
Input
M 10 11 1 2 3 4 Tu 1 2 3 4 W 9 10 11 1 Th 9 10 11 F 2 3 4
5
Alma Trombone 2 M 1 2 3 Tu 1 4 W 1 Th 9 11 F 2 3
Ben Trumpet 2 M Tu 3 W 11 1 Th F
Ivy Saxophone 3 M 2 Tu 1 2 W 9 11 1 Th 9 F 3 4
Jim Drums 1 M 10 3 Tu 2 4 W 1 Th 9 F
MJ Saxophone 2 M 11 3 4 Tu 2 3 4 W 9 10 11 Th 11 F
1
MJ Ben
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- Ivy/Saxophone Alma/Trombone --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- Ben/Trumpet MJ/Saxophone --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Alma/Trombone Jim/Drums -------------- --------------
2 -------------- Ivy/Saxophone -------------- -------------- --------------
3 -------------- Ben/Trumpet -------------- -------------- --------------
4 MJ/Saxophone -------------- -------------- -------------- Ivy/Saxophone
256+34+14+36+256=596
0+0+50+50+0=100
10+24+24+12+2=72
0+15+15+15+0=45
813
Validator 15 Validator
Input
M 10 11 1 2 3 Tu 11 1 2 W 10 11 1 2 Th 2 3 4 F 8 9 10
4
Coop Saxophone 3 M 1 2 3 Tu 1 2 W 10 11 Th 2 4 F 10
Levi Saxophone 2 M 10 11 Tu 11 W Th 2 3 4 F
Mia Flute 2 M 10 11 2 Tu 11 1 W 2 Th 2 F 9 10
Sara Trombone 2 M 10 11 3 Tu 11 1 W 10 1 Th F 10
1
Coop Sara
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- Mia/Flute
10 Levi/Saxophone -------------- Coop/Saxophone -------------- Coop/Saxophone
11 Sara/Trombone Sara/Trombone -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Mia/Flute -------------- -------------- --------------
2 -------------- Coop/Saxophone -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- Levi/Saxophone --------------
36+14+68+256+66=440
50+50+0+0+0=100
30+28+9+4+6=77
15+0+0+0+0=15
632
5 Days of Drums...Ugh! Test
Input
M 8 9 10 Tu 8 9 10 11 1 2 W 1 2 3 Th 10 11 1 2 3 4 F 8 9 10
6
Cole Saxophone 4 M 9 10 Tu 1 W 1 2 3 Th F 9
Coop Drums 2 M Tu 10 11 2 W 2 3 Th 10 11 1 2 3 F 8
Joe Flute 1 M Tu 11 W Th 2 F 10
Luna Drums 1 M 8 10 Tu 10 W 2 Th 11 F 10
Ryan Flute 1 M 9 Tu 10 11 W 3 Th 11 F
Sam Drums 2 M 9 10 Tu 9 10 W 2 Th 11 3 F
2
Coop Ryan
Luna Joe
Output
Monday Tuesday Wednesday Thursday Friday
8 Luna/Drums -------------- -------------- -------------- Coop/Drums
9 Cole/Saxophone -------------- -------------- -------------- Cole/Saxophone
10 -------------- Coop/Drums -------------- -------------- --------------
11 -------------- Joe/Flute -------------- -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Cole/Saxophone Cole/Saxophone -------------- --------------
2 -------------- -------------- Sam/Drums -------------- --------------
3 -------------- -------------- Ryan/Flute Sam/Drums --------------
4 -------------- -------------- -------------- -------------- --------------
128+14+34+130+128=434
50+50+0+0+50=150
30+32+18+4+6=90
0+15+15+0+0=30
704
Validator 16 Validator
Input
M 9 10 11 1 2 3 Tu 8 9 10 11 W 9 10 11 1 Th 9 10 11 F 8 9 10
6
Alex Baritone 2 M 11 Tu 11 W Th 9 F
Dave Tuba 2 M 3 Tu 8 10 W 9 10 Th 10 F 9 10
JT Baritone 2 M 1 Tu 10 W Th 9 10 F 8
Sam Saxophone 2 M 9 Tu 9 W 9 Th F
Tony Trumpet 3 M 9 10 Tu 9 11 W 9 11 Th 9 11 F
Zara Flute 1 M 11 2 Tu 8 W Th 11 F 9
2
Dave JT
Zara Tony
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- Dave/Tuba -------------- -------------- JT/Baritone
9 Sam/Saxophone Sam/Saxophone -------------- Alex/Baritone --------------
10 Tony/Trumpet JT/Baritone -------------- Dave/Tuba --------------
11 Alex/Baritone Tony/Trumpet -------------- Tony/Trumpet --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- -------------- -------------- --------------
2 Zara/Flute -------------- -------------- -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
10+32+512+34+256=844
50+50+0+50+0=150
55+48+0+18+3=124
30+30+0+30+0=90
1208
Monday at 8am...Really? Test
Input
M 8 9 10 Tu 11 1 2 W 1 2 3 Th 2 3 4 F 9 10 11 1 2
5
Abby Tuba 2 M 8 9 Tu 11 1 W 2 Th 2 3 F 9 10 1 2
Alex Clarinet 2 M Tu 11 1 W 1 Th F
Ella Saxophone 2 M Tu W 3 Th 3 F 9 11
Isla Flute 2 M 8 9 Tu W 2 Th F 10 1
Lola Saxophone 3 M 8 9 Tu 1 2 W 1 2 3 Th 2 3 4 F 10 11 1 2
1
Alex Lola
Output
Monday Tuesday Wednesday Thursday Friday
8 Lola/Saxophone -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- Abby/Tuba
10 -------------- -------------- -------------- -------------- Isla/Flute
11 -------------- Alex/Clarinet -------------- -------------- Ella/Saxophone
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Abby/Tuba Alex/Clarinet -------------- --------------
2 -------------- Lola/Saxophone Isla/Flute -------------- --------------
3 -------------- -------------- Ella/Saxophone -------------- --------------
4 -------------- -------------- -------------- Lola/Saxophone --------------
256+14+34+256+34=594
0+0+0+0+0=0
15+28+18+4+9=74
0+15+15+0+15=45
713
Validator 17 Validator
Input
M 10 11 1 2 3 4 Tu 10 11 1 2 3 W 10 11 1 2 Th 9 10 11 1 F 8 9 10
5
Dave Trumpet 2 M 10 1 Tu 1 3 W Th 11 1 F 8 10
Gabe Trombone 1 M 1 2 Tu 10 W 2 Th F
Lily Trombone 3 M 2 3 Tu 1 3 W 11 Th 9 1 F
Mike Drums 2 M Tu W 2 Th 9 10 F 8
Nora Baritone 3 M 10 Tu 10 3 W 10 2 Th 11 1 F 10
1
Nora Mike
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- Mike/Drums --------------
10 Nora/Baritone Gabe/Trombone Nora/Baritone -------------- --------------
11 -------------- -------------- Lily/Trombone Dave/Trumpet --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Dave/Trumpet -------------- -------------- Lily/Trombone --------------
2 -------------- -------------- Mike/Drums -------------- --------------
3 Lily/Trombone Nora/Baritone -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
12+22+12+14+512=572
0+50+50+100+0=200
35+20+24+16+0=95
15+15+15+15+0=60
927
So Many Options Test
Input
M 10 11 1 2 Tu 8 9 10 11 W 11 1 2 Th 10 11 1 F 2 3 4
6
Abby Tuba 1 M Tu 10 11 W Th 10 11 F 4
Adam Trumpet 2 M 10 Tu 8 10 W 2 Th F 4
Anna Trombone 1 M Tu W Th 11 1 F 2
Emma Tuba 2 M 11 2 Tu 8 11 W 1 Th 1 F
Leo Trumpet 2 M 10 1 Tu 8 10 11 W 1 2 Th 10 11 1 F 3 4
Zoey Drums 2 M 10 11 1 2 Tu W 11 Th 10 F 3
1
Leo Anna
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- Adam/Trumpet -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 Adam/Trumpet -------------- -------------- Abby/Tuba --------------
11 Emma/Tuba -------------- Zoey/Drums Anna/Trombone --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 Zoey/Drums -------------- Emma/Tuba Leo/Trumpet --------------
2 -------------- -------------- Leo/Trumpet -------------- --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
14+256+14+14+512=810
50+50+50+50+0=200
40+12+21+16+0=89
30+0+15+30+0=75
1174
Validator 18 Validator
Input
M 10 11 Tu 10 11 W 11 1 2 Th 10 11 1 2 F 11 1 2
4
Ali Trumpet 1 M Tu 11 W 11 Th 11 1 F 2
Noah Drums 2 M Tu W 1 2 Th 10 11 1 2 F 11 1
Nora Trombone 3 M 10 11 Tu 10 11 W 11 1 2 Th 10 11 1 2 F 11 1 2
Tony Tuba 1 M 10 11 Tu 10 W 1 Th 1 F 2
1
Ali Noah
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- -------------- --------------
10 -------------- -------------- -------------- -------------- --------------
11 -------------- -------------- Ali/Trumpet Noah/Drums Noah/Drums
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- -------------- Nora/Trombone Nora/Trombone Nora/Trombone
2 -------------- -------------- -------------- -------------- Tony/Tuba
3 -------------- -------------- -------------- -------------- --------------
4 -------------- -------------- -------------- -------------- --------------
512+512+18+18+14=1074
0+0+50+50+50=150
0+0+15+10+7=32
0+0+15+15+30=60
1316
Here Comes the Weekend Test
Input
M 2 3 4 Tu 9 10 11 1 2 3 W 11 1 2 3 4 Th 11 1 2 F 8 9 10 11 1
6
Adam Drums 2 M 3 Tu W 1 Th F 8 1
Alma Trombone 3 M 2 3 Tu 9 3 W 11 1 2 Th 11 1 2 F 10
Anna Flute 2 M 4 Tu 9 10 W 2 4 Th F 10 1
Joe Baritone 2 M 4 Tu 9 1 W 1 Th 1 F
Liam Baritone 1 M Tu 9 11 W 3 Th 2 F
Lola Tuba 2 M Tu W 11 2 Th F 10
2
Liam Joe
Adam Anna
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- Adam/Drums
9 -------------- Alma/Trombone -------------- -------------- --------------
10 -------------- Anna/Flute -------------- -------------- Lola/Tuba
11 -------------- -------------- Alma/Trombone -------------- --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Joe/Baritone Adam/Drums -------------- --------------
2 -------------- -------------- Lola/Tuba -------------- --------------
3 Alma/Trombone -------------- Liam/Baritone -------------- --------------
4 Joe/Baritone -------------- Anna/Flute -------------- --------------
128+14+10+512+66=730
0+50+50+0+50=150
20+32+33+0+6=91
15+30+15+0+15=75
1046
Validator 19 Validator
Input
M 10 11 1 2 Tu 9 10 11 1 2 W 9 10 11 Th 9 10 11 1 2 F 11 1 2 3 4
5
Ben Trumpet 2 M 11 1 Tu W 11 Th 11 F 11
Izzy Trumpet 1 M Tu 10 11 1 W Th F
Jo Trombone 3 M Tu 2 W Th 9 2 F 1
Leo Baritone 2 M 10 11 Tu 11 W Th 9 F 11 1 3
Luna Tuba 3 M 11 2 Tu 1 W 10 Th 9 F 2 4
2
Izzy Jo
Ben Luna
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- Luna/Tuba --------------
10 -------------- Izzy/Trumpet -------------- -------------- --------------
11 -------------- Leo/Baritone -------------- Ben/Trumpet Ben/Trumpet
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Luna/Tuba -------------- -------------- Jo/Trombone
2 -------------- Jo/Trombone -------------- Jo/Trombone --------------
3 -------------- -------------- -------------- -------------- Leo/Baritone
4 -------------- -------------- -------------- -------------- Luna/Tuba
512+10+512+12+12=1058
0+50+0+50+50=150
0+40+0+16+9=65
0+30+0+15+45=90
1363
Hump Day! Test
Input
M 9 10 11 1 Tu 10 11 1 2 3 4 W 10 11 1 Th 9 10 11 1 2 F 9 10 11
7
Alex Trombone 2 M 1 Tu 1 W Th 1 F 10
Cole Trumpet 1 M Tu 1 4 W Th 9 11 F 9 10
Dave Saxophone 2 M Tu 11 2 4 W 10 Th 11 2 F
Drew Drums 2 M Tu 10 2 W Th 10 11 1 2 F 10
John Clarinet 2 M 10 Tu 1 4 W 10 11 Th 9 10 1 F
Mike Tuba 2 M Tu 4 W Th 9 11 F 9 10 11
Noah Trombone 1 M 1 Tu W Th 9 1 2 F
2
Noah John
Drew Alex
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 -------------- -------------- -------------- Cole/Trumpet Mike/Tuba
10 John/Clarinet Drew/Drums -------------- John/Clarinet Alex/Trombone
11 -------------- -------------- -------------- Drew/Drums --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Alex/Trombone -------------- Noah/Trombone --------------
2 -------------- Dave/Saxophone -------------- Dave/Saxophone --------------
3 -------------- -------------- -------------- -------------- --------------
4 -------------- Mike/Tuba -------------- -------------- --------------
68+10+512+8+66=664
0+50+0+100+50=200
15+36+0+26+6=83
0+30+0+30+0=60
1007
Validator 20 Validator
Input
M 9 10 11 Tu 11 1 2 3 W 2 3 4 Th 9 10 11 F 10 11 1 2 3 4
5
Alma Baritone 2 M 10 11 Tu 1 2 W 2 3 Th 9 F 10 11 2 3
Bob Trombone 2 M Tu 11 2 3 W 2 3 4 Th 9 10 11 F 11 3 4
Gabe Trumpet 3 M 9 Tu 11 1 2 3 W Th 9 F
Jim Baritone 2 M Tu W 3 Th 11 F 11
Leo Flute 1 M 9 Tu 11 W Th F 10 1 2 4
2
Alma Jim
Bob Gabe
Output
Monday Tuesday Wednesday Thursday Friday
8 -------------- -------------- -------------- -------------- --------------
9 Gabe/Trumpet -------------- -------------- Gabe/Trumpet --------------
10 Alma/Baritone -------------- -------------- -------------- --------------
11 -------------- Leo/Flute -------------- Jim/Baritone --------------
LUNCH LUNCH LUNCH LUNCH LUNCH
1 -------------- Gabe/Trumpet -------------- -------------- --------------
2 -------------- Alma/Baritone -------------- -------------- --------------
3 -------------- Bob/Trombone Jim/Baritone -------------- --------------
4 -------------- -------------- Bob/Trombone -------------- --------------
66+12+128+36+512=754
50+0+0+50+0=100
30+36+12+12+0=90
0+15+0+15+0=30
974
Solution language
Solution
Stub generator input