Cody

Solution 1981130

Submitted on 17 Oct 2019 by Eugene Kronberg
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
x = [1 2 3 4 5 6 7]; xi = split_it(x); assert(isequal(sum(x(xi)),sum(x)/2));

y = 127 z = '0000001' z = '0000010' z = '0000011' z = '0000100' z = '0000101' z = '0000110' z = '0000111' z = '0001000' z = '0001001' z = '0001010' z = '0001011' z = '0001100' z = '0001101' z = '0001110' z = '0001111' z = '0010000' z = '0010001' z = '0010010' z = '0010011' z = '0010100' z = '0010101' z = '0010110'

2   Pass
x = [2 2 2 2 2 2]; xi = split_it(x); assert(isequal(sum(x(xi)),sum(x)/2));

y = 63 z = '000001' z = '000010' z = '000011' z = '000100' z = '000101' z = '000110' z = '000111'

3   Pass
x = [2 5 4 5 4]; xi = split_it(x); assert(isequal(sum(x(xi)),sum(x)/2));

y = 31 z = '00001' z = '00010' z = '00011' z = '00100' z = '00101' z = '00110' z = '00111' z = '01000' z = '01001' z = '01010'

4   Pass
x = [1 3 1 1 9 7]; xi = split_it(x); assert(isequal(sum(x(xi)),sum(x)/2));

y = 63 z = '000001' z = '000010' z = '000011' z = '000100' z = '000101' z = '000110' z = '000111' z = '001000' z = '001001' z = '001010' z = '001011' z = '001100' z = '001101' z = '001110'

5   Pass
x = primes(100); xi = split_it(x); assert(isequal(sum(x(xi)),sum(x)/2));

y = 33554431 z = '0000000000000000000000001' z = '0000000000000000000000010' z = '0000000000000000000000011' z = '0000000000000000000000100' z = '0000000000000000000000101' z = '0000000000000000000000110' z = '0000000000000000000000111' z = '0000000000000000000001000' z = '0000000000000000000001001' z = '0000000000000000000001010' z = '0000000000000000000001011' z = '0000000000000000000001100' z = '0000000000000000000001101' z = '0000000000000000000001110' z = '0000000000000000000001111' z = '0000000000000000000010000' z = '0000000000000000000010001' z = '0000000000000000000010010' z = '0000000000000000000010011' z = '0000000000000000000010100' z = '0000000000000000000010101' z = '0000000000000000000010110' z = '0000000000000000000010111' z = '0000000000000000000011000' z = '0000000000000000000011001' z = '0000000000000000000011010' z = '0000000000000000000011011' z = '0000000000000000000011100' z = '0000000000000000000011101' z = '0000000000000000000011110' z = '0000000000000000000011111' z = '0000000000000000000100000' z = '0000000000000000000100001' z = '0000000000000000000100010' z = '0000000000000000000100011' z = '0000000000000000000100100' z = '0000000000000000000100101' z = '0000000000000000000100110' z = '0000000000000000000100111' z = '0000000000000000000101000' z = '0000000000000000000101001' z = '0000000000000000000101010' z = '0000000000000000000101011' z = '0000000000000000000101100' z = '0000000000000000000101101' z = '0000000000000000000101110' z = '0000000000000000000101111' z = '0000000000000000000110000' z = '0000000000000000000110001' z = '0000000000000000000110010' z = '0000000000000000000110011' z = '0000000000000000000110100' z = '0000000000000000000110101' z = '0000000000000000000110110' z = '0000000000000000000110111' z = '0000000000000000000111000' z = '0000000000000000000111001' z = '0000000000000000000111010' z = '0000000000000000000111011' z = '0000000000000000000111100' z = '0000000000000000000111101' z = '0000000000000000000111110' z = '0000000000000000000111111' z = '0000000000000000001000000' z = '0000000000000000001000001' z = '0000000000000000001000010' z = '0000000000000000001000011' z = '0000000000000000001000100' z = '0000000000000000001000101' z = '0000000000000000001000110' z = '0000000000000000001000111' z = '0000000000000000001001000' z = '0000000000000000001001001' z = '0000000000000000001001010' z = '0000000000000000001001011' z = '0000000000000000001001100' z = '0000000000000000001001101' z = '0000000000000000001001110' z = '0000000000000000001001111' z = '0000000000000000001010000' z = '0000000000000000001010001' z = '0000000000000000001010010' z = '0000000000000000001010011' z = '0000000000000000001010100' z = '0000000000000000001010101' z = '0000000000000000001010110' z = '0000000000000000001010111' z = '0000000000000000001011000' z = '0000000000000000001011001' z = '0000000000000000001011010' z = '0000000000000000001011011' z = '0000000000000000001011100' z = '0000000000000000001011101' z = '0000000000000000001011110' z = '0000000000000000001011111' z = '0000000000000000001100000' z = '0000000000000000001100001' z = '0000000000000000001100010' z = '0000000000000000001100011' z = '0000000000000000001100100' z = '0000000000000000001100101' z = '0000000000000000001100110' z = '0000000000000000001100111' z = '0000000000000000001101000' z = '0000000000000000001101001' z = '0000000000000000001101010' z = '0000000000000000001101011' z = '0000000000000000001101100' z = '0000000000000000001101101' z = '0000000000000000001101110' z = '0000000000000000001101111' z = '0000000000000000001110000' z = '0000000000000000001110001' z = '0000000000000000001110010' z = '0000000000000000001110011' z = '0000000000000000001110100' z = '0000000000000000001110101' z = '0000000000000000001110110' z = '0000000000000000001110111' z = '0000000000000000001111000' z = '0000000000000000001111001' z = '0000000000000000001111010' z = '0000000000000000001111011' z = '0000000000000000001111100' z = '0000000000000000001111101' z = '0000000000000000001111110' z = '0000000000000000001111111' z = '0000000000000000010000000' z = '0000000000000000010000001' z = '0000000000000000010000010' z = '0000000000000000010000011' z = '0000000000000000010000100' z = '0000000000000000010000101' z = '0000000000000000010000110' z = '0000000000000000010000111' z = '0000000000000000010001000' z = '0000000000000000010001001' z = '0000000000000000010001010' z = '0000000000000000010001011' z = '0000000000000000010001100' z = '0000000000000000010001101' z = '0000000000000000010001110' z = '0000000000000000010001111' z = '0000000000000000010010000' z = '0000000000000000010010001' z = '0000000000000000010010010' z = '0000000000000000010010011' z = '0000000000000000010010100' z = '0000000000000000010010101' z = '0000000000000000010010110' z = '0000000000000000010010111' z = '0000000000000000010011000' z = '0000000000000000010011001' z = '0000000000000000010011010' z = '0000000000000000010011011' z = '0000000000000000010011100' z = '0000000000000000010011101' z = '0000000000000000010011110' z = '0000000000000000010011111' z = '0000000000000000010100000' z = '0000000000000000010100001' z = '0000000000000000010100010' z = '0000000000000000010100011' z = '0000000000000000010100100' z = '0000000000000000010100101' z = '0000000000000000010100110' z = '0000000000000000010100111' z = '0000000000000000010101000' z = '0000000000000000010101001' z = '0000000000000000010101010' z = '0000000000000000010101011' z = '0000000000000000010101100' z = '0000000000000000010101101' z = '0000000000000000010101110' z = '0000000000000000010101111' z = '0000000000000000010110000' z = '0000000000000000010110001' z = '0000000000000000010110010' z = '0000000000000000010110011' z = '0000000000000000010110100' z = '0000000000000000010110101' z = '0000000000000000010110110' z = '0000000000000000010110111' z = '0000000000000000010111000' z = '0000000000000000010111001' z = '0000000000000000010111010' z = '0000000000000000010111011' z = '0000000000000000010111100' z = '0000000000000000010111101' z = '0000000000000000010111110' z = '0000000000000000010111111' z = '0000000000000000011000000' z = '0000000000000000011000001' z = '0000000000000000011000010' z = '0000000000000000011000011' z = '0000000000000000011000100' z = '0000000000000000011000101' z = '0000000000000000011000110' z = '0000000000000000011000111' z = '0000000000000000011001000' z = '0000000000000000011001001' z = '0000000000000000011001010' z = '0000000000000000011001011' z = '0000000000000000011001100' z = '0000000000000000011001101' z = '0000000000000000011001110' z = '0000000000000000011001111' z = '0000000000000000011010000' z = '0000000000000000011010001' z = '0000000000000000011010010' z = '0000000000000000011010011' z = '0000000000000000011010100' z = '0000000000000000011010101' z = '0000000000000000011010110' z = '0000000000000000011010111' z = '0000000000000000011011000' z = '0000000000000000011011001' z = '0000000000000000011011010' z = '0000000000000000011011011' z = '0000000000000000011011100' z = '0000000000000000011011101' z = '0000000000000000011011110' z = '0000000000000000011011111' z = '0000000000000000011100000' z = '0000000000000000011100001' z = '0000000000000000011100010' z = '0000000000000000011100011' z = '0000000000000000011100100' z = '0000000000000000011100101' z = '0000000000000000011100110' z = '0000000000000000011100111' z = '0000000000000000011101000' z = '0000000000000000011101001' z = '0000000000000000011101010' z = '0000000000000000011101011' z = '0000000000000000011101100' z = '0000000000000000011101101' z = '0000000000000000011101110' z = '0000000000000000011101111' z = '0000000000000000011110000' z = '0000000000000000011110001' z = '0000000000000000011110010' z = '0000000000000000011110011' z = '0000000000000000011110100' z = '0000000000000000011110101' z = '0000000000000000011110110' z = '0000000000000000011110111' z = '0000000000000000011111000' z = '0000000000000000011111001' z = '0000000000000000011111010' z = '0000000000000000011111011' z = '0000000000000000011111100' z = '0000000000000000011111101' z = '0000000000000000011111110' z = '0000000000000000011111111' z = '0000000000000000100000000...