Added greedy solution to P18.

It's a wrong solution... just a premature though.