Cody

Solution 2281116

Submitted on 14 May 2020 by Ramesh Kumar V
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(two_reactors(5,1,6,5),24))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 24

2   Pass
assert(isequal(two_reactors(1,2,2,2),5))

flag = 0 x1 = 2 y1 = 4 4 x2 = 2 2 y2 = 4 4 RC1 = 1 2 3 4 4 RC2 = 1 2 2 3 4 4 X = Columns 1 through 30 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 31 through 60 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 61 through 75 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 flag = 1 y = 5

3   Pass
assert(isequal(two_reactors(7,7,7,1),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 flag = 1 y = 10

4   Pass
assert(isequal(two_reactors(1,4,6,7),11))

flag = 0 x1 = 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 Columns 31 through 60 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 Columns 61 through 90 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 Columns 91 through 105 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 11

5   Pass
assert(isequal(two_reactors(5,9,8,10),11))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 271 through 300 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 11

6   Pass
assert(isequal(two_reactors(6,4,2,7),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 9

7   Pass
assert(isequal(two_reactors(8,5,1,3),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 Columns 31 through 60 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 Columns 61 through 90 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 1 2 3 4 4 4 flag = 1 y = 11

8   Pass
assert(isequal(two_reactors(2,3,5,6),12))

flag = 0 x1 = 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 12

9   Pass
assert(isequal(two_reactors(5,9,6,10),9))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 9

10   Pass
assert(isequal(two_reactors(7,10,3,7),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 10

11   Pass
assert(isequal(two_reactors(3,7,7,1),10))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 flag = 1 y = 10

12   Pass
assert(isequal(two_reactors(3,3,7,9),14))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 14

13   Pass
assert(isequal(two_reactors(4,8,7,1),10))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 flag = 1 y = 10

14   Pass
assert(isequal(two_reactors(7,4,10,1),13))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 Columns 181 through 195 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 13

15   Pass
assert(isequal(two_reactors(5,5,5,8),8))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 8

16   Pass
assert(isequal(two_reactors(4,8,5,1),8))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 flag = 1 y = 8

17   Pass
assert(isequal(two_reactors(2,8,5,2),8))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 135 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 flag = 1 y = 8

18   Pass
assert(isequal(two_reactors(4,7,2,8),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 7

19   Pass
assert(isequal(two_reactors(3,10,3,8),6))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 6

20   Pass
assert(isequal(two_reactors(2,3,1,6),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 Columns 61 through 90 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 Columns 121 through 135 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 flag = 1 y = 5

21   Pass
assert(isequal(two_reactors(7,6,5,7),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 10

22   Pass
assert(isequal(two_reactors(7,7,7,10),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 10

23   Pass
assert(isequal(two_reactors(3,8,3,2),6))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 Columns 31 through 60 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 Columns 91 through 105 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 flag = 1 y = 6

24   Pass
assert(isequal(two_reactors(7,5,5,7),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 10

25   Pass
assert(isequal(two_reactors(8,4,7,5),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 11

26   Pass
assert(isequal(two_reactors(9,9,3,7),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 211 through 240 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 271 through 300 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 12

27   Pass
assert(isequal(two_reactors(6,6,9,3),12))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 12

28   Pass
assert(isequal(two_reactors(4,2,10,7),15))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 Columns 31 through 60 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 15

29   Pass
assert(isequal(two_reactors(10,1,9,1),156))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 Columns 181 through 195 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 156

30   Pass
assert(isequal(two_reactors(5,7,6,7),9))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 9

31   Pass
assert(isequal(two_reactors(6,8,6,10),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 9

32   Pass
assert(isequal(two_reactors(3,2,2,1),20))

flag = 0 x1 = 2 2 2 y1 = 4 4 x2 = 2 2 y2 = 4 RC1 = 1 2 2 2 3 4 4 RC2 = 1 2 2 3 4 X = Columns 1 through 30 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 Columns 31 through 60 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 Columns 91 through 105 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 31 through 60 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 61 through 75 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 flag = 1 y = 20

33   Pass
assert(isequal(two_reactors(5,5,4,8),8))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 8

34   Pass
assert(isequal(two_reactors(7,8,10,10),13))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 241 through 270 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 271 through 300 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 301 through 330 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 13

35   Pass
assert(isequal(two_reactors(2,2,7,1),30))

flag = 0 x1 = 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 flag = 1 y = 30

36   Pass
assert(isequal(two_reactors(6,6,9,5),12))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 12

37   Pass
assert(isequal(two_reactors(4,7,8,6),11))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 11

38   Pass
assert(isequal(two_reactors(4,2,6,3),31))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 Columns 31 through 60 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 121 through 150 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 165 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 31

39   Pass
assert(isequal(two_reactors(1,8,3,5),6))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 Columns 61 through 90 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 Columns 91 through 120 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 Columns 151 through 165 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 31 through 60 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 flag = 1 y = 6

40   Pass
assert(isequal(two_reactors(7,4,8,4),11))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 flag = 1 y = 11

41   Pass
assert(isequal(two_reactors(7,8,5,1),16))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 flag = 1 y = 16

42   Pass
assert(isequal(two_reactors(4,5,3,2),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 61 through 90 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 165 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 Columns 31 through 60 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 1 2 2 2 3 4 Columns 91 through 105 4 1 2 2 2 3 4 4 1 2 2 2 3 4 4 flag = 1 y = 7

43   Pass
assert(isequal(two_reactors(9,5,9,4),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 flag = 1 y = 12

44   Pass
assert(isequal(two_reactors(8,4,9,8),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 12

45   Pass
assert(isequal(two_reactors(4,3,8,10),16))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 Columns 31 through 60 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 Columns 61 through 90 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 135 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 271 through 300 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 16

46   Pass
assert(isequal(two_reactors(4,7,5,9),8))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 8

47   Pass
assert(isequal(two_reactors(8,2,9,10),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 151 through 180 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 240 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 271 through 300 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 301 through 315 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 12

48   Pass
assert(isequal(two_reactors(6,9,6,2),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 flag = 1 y = 9

49   Pass
assert(isequal(two_reactors(2,5,8,9),14))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 135 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 14

50   Pass
assert(isequal(two_reactors(8,4,6,1),27))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 61 through 90 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 135 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 flag = 1 y = 27

51   Pass
assert(isequal(two_reactors(2,2,7,5),11))

flag = 0 x1 = 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 11

52   Pass
assert(isequal(two_reactors(2,5,2,1),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 x2 = 2 2 y2 = 4 RC1 = 1 2 2 3 4 4 4 4 4 RC2 = 1 2 2 3 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 135 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 31 through 60 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 61 through 75 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 flag = 1 y = 5

53   Pass
assert(isequal(two_reactors(9,6,10,7),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 181 through 210 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 13

54   Pass
assert(isequal(two_reactors(6,9,9,10),12))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 151 through 180 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 240 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 271 through 300 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 301 through 315 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 12

55   Pass
assert(isequal(two_reactors(1,9,7,10),10))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 10

56   Pass
assert(isequal(two_reactors(6,5,9,3),12))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 12

57   Pass
assert(isequal(two_reactors(5,10,6,9),9))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 9

58   Pass
assert(isequal(two_reactors(8,6,3,7),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 11

59   Pass
assert(isequal(two_reactors(1,7,7,8),10))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 10

60   Pass
assert(isequal(two_reactors(9,10,8,6),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 151 through 180 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 240 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 271 through 300 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 301 through 315 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 12

61   Pass
assert(isequal(two_reactors(10,6,1,2),14))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 31 through 60 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 61 through 75 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 flag = 1 y = 14

62   Pass
assert(isequal(two_reactors(9,5,9,3),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 12

63   Pass
assert(isequal(two_reactors(6,7,1,7),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 flag = 1 y = 9

64   Pass
assert(isequal(two_reactors(4,1,5,2),35))

flag = 0 x1 = 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 Columns 31 through 60 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 Columns 91 through 105 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 135 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 flag = 1 y = 35

65   Pass
assert(isequal(two_reactors(2,3,2,2),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 x2 = 2 2 y2 = 4 4 RC1 = 1 2 2 3 4 4 4 RC2 = 1 2 2 3 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 flag = 1 y = 5

66   Pass
assert(isequal(two_reactors(1,7,3,6),6))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 Columns 31 through 60 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 121 through 150 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 1 2 2 2 3 4 4 Columns 151 through 165 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 6

67   Pass
assert(isequal(two_reactors(7,5,6,5),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 10

68   Pass
assert(isequal(two_reactors(2,5,9,9),14))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 135 3 4 4 4 4 4 1 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 211 through 240 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 271 through 300 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 14

69   Pass
assert(isequal(two_reactors(3,3,6,7),14))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 14

70   Pass
assert(isequal(two_reactors(5,3,10,1),39))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 31 through 60 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 2 Columns 181 through 195 3 4 1 2 2 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 39

71   Pass
assert(isequal(two_reactors(2,2,2,7),5))

flag = 0 x1 = 2 2 y1 = 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 5

72   Pass
assert(isequal(two_reactors(6,1,10,8),18))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 61 through 90 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 135 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 271 through 300 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 18

73   Pass
assert(isequal(two_reactors(8,1,9,10),33))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 Columns 61 through 90 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 165 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 151 through 180 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 240 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 241 through 270 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 271 through 300 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 301 through 315 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 33

74   Pass
assert(isequal(two_reactors(10,9,8,6),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 31 through 60 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 Columns 151 through 180 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 211 through 240 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 241 through 270 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 271 through 300 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 301 through 315 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 13

75   Pass
assert(isequal(two_reactors(2,4,2,1),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 x2 = 2 2 y2 = 4 RC1 = 1 2 2 3 4 4 4 4 RC2 = 1 2 2 3 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 31 through 60 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 61 through 75 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 flag = 1 y = 5

76   Pass
assert(isequal(two_reactors(10,4,3,4),15))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 Columns 61 through 90 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 135 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 flag = 1 y = 15

77   Pass
assert(isequal(two_reactors(5,7,1,9),8))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 8

78   Pass
assert(isequal(two_reactors(6,9,4,5),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 61 through 90 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 165 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 9

79   Pass
assert(isequal(two_reactors(1,2,7,4),10))

flag = 0 x1 = 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 31 through 60 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 61 through 75 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 flag = 1 y = 10

80   Pass
assert(isequal(two_reactors(9,2,10,6),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 13

81   Pass
assert(isequal(two_reactors(8,10,3,5),16))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 271 through 300 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 31 through 60 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 flag = 1 y = 16

82   Pass
assert(isequal(two_reactors(5,8,9,2),12))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 12

83   Pass
assert(isequal(two_reactors(2,4,1,6),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 Columns 61 through 90 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 1 2 3 Columns 121 through 135 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 flag = 1 y = 5

84   Pass
assert(isequal(two_reactors(4,2,3,10),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 Columns 31 through 60 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 1 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 7

85   Pass
assert(isequal(two_reactors(7,5,10,2),13))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 13

86   Pass
assert(isequal(two_reactors(8,8,6,2),29))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 flag = 1 y = 29

87   Pass
assert(isequal(two_reactors(6,3,2,3),20))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 x2 = 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 RC2 = 1 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 121 through 150 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 165 3 4 4 4 1 2 2 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 flag = 1 y = 20

88   Pass
assert(isequal(two_reactors(9,1,3,1),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 x2 = 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 RC2 = 1 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 flag = 1 y = 12

89   Pass
assert(isequal(two_reactors(5,1,9,2),64))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 1 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 64

90   Pass
assert(isequal(two_reactors(1,4,5,2),18))

flag = 0 x1 = 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 Columns 31 through 60 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 Columns 61 through 90 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 Columns 91 through 105 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 135 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 flag = 1 y = 18

91   Pass
assert(isequal(two_reactors(10,4,3,1),30))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 flag = 1 y = 30

92   Pass
assert(isequal(two_reactors(3,1,6,8),12))

flag = 0 x1 = 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 12

93   Pass
assert(isequal(two_reactors(7,1,1,8),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 x2 = 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 RC2 = 1 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 Columns 61 through 90 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 Columns 91 through 120 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 Columns 151 through 165 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 10

94   Pass
assert(isequal(two_reactors(10,6,2,9),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 13

95   Pass
assert(isequal(two_reactors(4,3,8,1),44))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 Columns 31 through 60 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 Columns 61 through 90 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 135 2 2 3 4 4 4 1 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 Columns 61 through 90 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 165 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 44

96   Pass
assert(isequal(two_reactors(1,7,7,6),10))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 10

97   Pass
assert(isequal(two_reactors(8,8,8,3),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 11

98   Pass
assert(isequal(two_reactors(1,1,1,1),4))

flag = 0 x1 = 2 y1 = 4 x2 = 2 y2 = 4 RC1 = 1 2 3 4 RC2 = 1 2 3 4 X = Columns 1 through 30 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 Columns 31 through 60 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Y = Columns 1 through 30 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 Columns 31 through 60 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 flag = 1 y = 4

99   Pass
assert(isequal(two_reactors(7,6,4,1),14))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 Columns 31 through 60 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 Columns 61 through 90 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 1 2 2 2 2 3 Columns 91 through 105 4 1 2 2 2 2 3 4 1 2 2 2 2 3 4 flag = 1 y = 14

100   Pass
assert(isequal(two_reactors(8,4,7,8),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 11

101   Pass
assert(isequal(two_reactors(2,2,6,5),11))

flag = 0 x1 = 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 11

102   Pass
assert(isequal(two_reactors(9,8,8,1),33))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 Columns 61 through 90 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 Columns 91 through 120 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 Columns 151 through 165 2 2 3 4 1 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 33

103   Pass
assert(isequal(two_reactors(1,1,8,10),12))

flag = 0 x1 = 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 Columns 31 through 60 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 271 through 300 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 12

104   Pass
assert(isequal(two_reactors(7,2,8,2),11))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 31 through 60 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 Columns 61 through 90 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 Columns 91 through 120 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 Columns 151 through 165 2 3 4 4 1 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 11

105   Pass
assert(isequal(two_reactors(2,7,4,7),7))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 7

106   Pass
assert(isequal(two_reactors(8,6,8,3),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 flag = 1 y = 11

107   Pass
assert(isequal(two_reactors(8,10,9,1),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 271 through 300 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 2 2 3 4 flag = 1 y = 12

108   Pass
assert(isequal(two_reactors(4,4,7,6),10))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 31 through 60 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 10

109   Pass
assert(isequal(two_reactors(8,4,3,1),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 flag = 1 y = 12

110   Pass
assert(isequal(two_reactors(8,3,4,6),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 11

111   Pass
assert(isequal(two_reactors(3,7,5,2),8))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 135 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 flag = 1 y = 8

112   Pass
assert(isequal(two_reactors(8,2,3,3),23))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 flag = 1 y = 23

113   Pass
assert(isequal(two_reactors(6,1,5,2),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 x2 = 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 3 4 RC2 = 1 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 31 through 60 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 Columns 61 through 90 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 1 2 2 Columns 121 through 135 2 2 2 2 3 4 1 2 2 2 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 61 through 90 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 135 2 2 2 3 4 4 1 2 2 2 2 2 3 4 4 flag = 1 y = 9

114   Pass
assert(isequal(two_reactors(2,8,3,7),6))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 6

115   Pass
assert(isequal(two_reactors(10,5,7,8),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 13

116   Pass
assert(isequal(two_reactors(5,7,2,10),8))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 8

117   Pass
assert(isequal(two_reactors(2,3,8,5),12))

flag = 0 x1 = 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 12

118   Pass
assert(isequal(two_reactors(8,4,3,1),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 flag = 1 y = 12

119   Pass
assert(isequal(two_reactors(7,5,5,7),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 10

120   Pass
assert(isequal(two_reactors(1,4,8,7),11))

flag = 0 x1 = 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 Columns 31 through 60 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 Columns 61 through 90 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 1 2 3 4 4 4 Columns 91 through 105 4 1 2 3 4 4 4 4 1 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 11

121   Pass
assert(isequal(two_reactors(2,2,1,1),12))

flag = 0 x1 = 2 2 y1 = 4 4 x2 = 2 y2 = 4 RC1 = 1 2 2 3 4 4 RC2 = 1 2 3 4 X = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Y = Columns 1 through 30 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 Columns 31 through 60 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4 flag = 1 y = 12

122   Pass
assert(isequal(two_reactors(5,7,8,6),11))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 flag = 1 y = 11

123   Pass
assert(isequal(two_reactors(2,7,2,2),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 RC1 = 1 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 flag = 1 y = 5

124   Pass
assert(isequal(two_reactors(1,2,2,2),5))

flag = 0 x1 = 2 y1 = 4 4 x2 = 2 2 y2 = 4 4 RC1 = 1 2 3 4 4 RC2 = 1 2 2 3 4 4 X = Columns 1 through 30 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 31 through 60 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Columns 61 through 75 1 2 3 4 4 1 2 3 4 4 1 2 3 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 31 through 60 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 Columns 61 through 90 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 1 2 2 3 4 4 flag = 1 y = 5

125   Pass
assert(isequal(two_reactors(4,4,3,3),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 31 through 60 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 Columns 31 through 60 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 Columns 61 through 90 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 Columns 91 through 120 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 1 2 2 2 3 4 4 4 flag = 1 y = 7

126   Pass
assert(isequal(two_reactors(9,8,6,2),19))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 3 4 4 flag = 1 y = 19

127   Pass
assert(isequal(two_reactors(3,1,10,8),18))

flag = 0 x1 = 2 2 2 y1 = 4 x2 = 2 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 RC2 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 241 through 270 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 271 through 300 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 18

128   Pass
assert(isequal(two_reactors(6,4,2,7),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 9

129   Pass
assert(isequal(two_reactors(10,2,3,4),27))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 Columns 151 through 180 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 Columns 61 through 90 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 135 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 flag = 1 y = 27

130   Pass
assert(isequal(two_reactors(1,7,5,10),8))

flag = 0 x1 = 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 8

131   Pass
assert(isequal(two_reactors(5,7,2,4),8))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 1 2 2 3 4 4 4 4 flag = 1 y = 8

132   Pass
assert(isequal(two_reactors(2,8,9,4),12))

flag = 0 x1 = 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 2 y2 = 4 4 4 4 RC1 = 1 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 flag = 1 y = 12

133   Pass
assert(isequal(two_reactors(7,3,6,9),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 10

134   Pass
assert(isequal(two_reactors(6,4,3,5),9))

flag = 0 x1 = 2 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 31 through 60 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 flag = 1 y = 9

135   Pass
assert(isequal(two_reactors(5,4,6,8),9))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 Columns 61 through 90 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 Columns 91 through 120 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 121 through 150 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 1 2 2 2 2 2 3 Columns 151 through 165 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 9

136   Pass
assert(isequal(two_reactors(5,5,2,1),10))

flag = 0 x1 = 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 31 through 60 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 31 through 60 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 Columns 61 through 75 1 2 2 3 4 1 2 2 3 4 1 2 2 3 4 flag = 1 y = 10

137   Pass
assert(isequal(two_reactors(3,4,7,10),15))

flag = 0 x1 = 2 2 2 y1 = 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 3 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 31 through 60 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 Columns 61 through 90 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 Columns 91 through 120 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 1 2 2 Columns 121 through 135 2 3 4 4 4 4 1 2 2 2 3 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 15

138   Pass
assert(isequal(two_reactors(10,5,3,8),13))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 31 through 60 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 Columns 61 through 90 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 3 4 4 4 4 4 4 Columns 181 through 195 4 4 1 2 2 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 13

139   Pass
assert(isequal(two_reactors(8,8,8,2),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 11

140   Pass
assert(isequal(two_reactors(7,5,3,1),12))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 31 through 60 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 Columns 61 through 90 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 1 2 2 2 3 4 flag = 1 y = 12

141   Pass
assert(isequal(two_reactors(9,2,2,7),38))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 Columns 61 through 90 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 Columns 91 through 120 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 1 2 2 3 4 4 4 Columns 151 through 165 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 38

142   Pass
assert(isequal(two_reactors(9,6,8,2),12))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 2 y2 = 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 2 3 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 181 through 210 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 31 through 60 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 121 through 150 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 1 2 2 2 2 2 2 2 2 3 4 4 flag = 1 y = 12

143   Pass
assert(isequal(two_reactors(10,6,7,1),50))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 121 through 150 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 Columns 211 through 240 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 241 through 270 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 31 through 60 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 61 through 90 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 91 through 120 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 Columns 121 through 150 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 1 2 2 2 2 2 2 2 3 4 flag = 1 y = 50

144   Pass
assert(isequal(two_reactors(9,8,2,6),15))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 31 through 60 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 91 through 120 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 flag = 1 y = 15

145   Pass
assert(isequal(two_reactors(4,6,4,5),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 31 through 60 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 Columns 151 through 180 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 61 through 90 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 Columns 121 through 150 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 3 4 Columns 151 through 165 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 7

146   Pass
assert(isequal(two_reactors(2,3,1,10),5))

flag = 0 x1 = 2 2 y1 = 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 3 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 1 2 2 3 4 4 Columns 91 through 105 4 1 2 2 3 4 4 4 1 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 Columns 31 through 60 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 Columns 61 through 90 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 91 through 120 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 Columns 121 through 150 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 Columns 181 through 195 4 4 1 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 5

147   Pass
assert(isequal(two_reactors(7,10,2,10),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 4 x2 = 2 2 y2 = 4 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 3 4 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 181 through 210 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 3 4 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 Columns 31 through 60 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 Columns 91 through 120 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 Columns 121 through 150 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 Columns 151 through 180 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 Columns 181 through 210 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 1 2 2 3 4 4 4 4 4 4 4 4 4 4 flag = 1 y = 10

148   Pass
assert(isequal(two_reactors(8,6,5,3),28))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 x2 = 2 2 2 2 2 y2 = 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 3 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 61 through 90 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 Columns 91 through 120 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 Columns 151 through 180 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 Columns 181 through 210 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 Columns 211 through 240 2 2 2 2 2 2 2 3 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 31 through 60 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 61 through 90 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 91 through 120 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 Columns 121 through 150 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 3 4 4 4 flag = 1 y = 28

149   Pass
assert(isequal(two_reactors(8,3,1,8),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 Columns 31 through 60 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 Columns 61 through 90 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 91 through 120 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 Columns 121 through 150 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 Columns 151 through 180 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 181 through 195 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 Columns 31 through 60 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 Columns 61 through 90 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 Columns 91 through 120 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 Columns 121 through 150 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 Columns 151 through 165 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 flag = 1 y = 11

150   Pass
assert(isequal(two_reactors(7,8,7,5),10))

flag = 0 x1 = 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 2 y2 = 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 2 3 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 Columns 61 through 90 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 181 through 210 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 3 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 31 through 60 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 Columns 61 through 90 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 91 through 120 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 Columns 121 through 150 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 Columns 151 through 180 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 Columns 181 through 210 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 3 4 4 4 4 4 flag = 1 y = 10

151   Pass
assert(isequal(two_reactors(4,9,4,9),7))

flag = 0 x1 = 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 7

152   Pass
assert(isequal(two_reactors(8,9,6,7),11))

flag = 0 x1 = 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 4 4 4 4 x2 = 2 2 2 2 2 2 y2 = 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 RC2 = 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 Columns 61 through 90 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 Columns 91 through 120 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 Columns 121 through 150 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 181 through 210 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 Columns 211 through 240 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 Columns 241 through 270 4 4 4 4 4 4 4 1 2 2 2 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 1 2 2 2 Columns 271 through 285 2 2 2 2 2 3 4 4 4 4 4 4 4 4 4 Y = Columns 1 through 30 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 31 through 60 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 61 through 90 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 91 through 120 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 121 through 150 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 151 through 180 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 181 through 210 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 Columns 211 through 225 1 2 2 2 2 2 2 3 4 4 4 4 4 4 4 flag = 1 y = 11

153   Pass
assert(isequal(two_reactors(10,5,1,9),16))

flag = 0 x1 = 2 2 2 2 2 2 2 2 2 2 y1 = 4 4 4 4 4 x2 = 2 y2 = 4 4 4 4 4 4 4 4 4 RC1 = 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 RC2 = 1 2 3 4 4 4 4 4 4 4 4 4 X = Columns 1 through 30 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 Columns 31 through 60 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 Columns 61 through 90 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 Columns 91 through 120 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 Columns 121 through 150 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 Columns 151 through 180 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 Columns 181 through 210 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 Columns 211 through 240 2 2 2 2 2 3 4 4 4 4 4 1 2 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 1 2 Columns 241 through 255 2 2 2 2 2 2 2 2 2 3 4 4 4 4 4 Y = Columns 1 through 30 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 31 through 60 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 61 through 90 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 91 through 120 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 Columns 121 through 150 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 Columns 151 through 180 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 1 2 3 4 4 4 4 4 4 4 4 4 flag = 1 y = 16