for #3 used a combination generator
Congratulations, you just used an exponential-time algorithm for a polynomial-time problem.
Congratulations, you just used an exponential-time algorithm for a polynomial-time problem.
I am not sure if this step of allowing the "shortcuts" was part of the game or not. All that would had to be done is to give 128 elements of the array to exclude at least the most blatant brute-forcing.