Added solutions for p1 and p131.

p1 is a little verbose, it could be made less java-y

p131 runs pretty slowly (in O(2^(length * length)) or so)