Find all unique triplets a b c in the array such that a + b + c = 0.
Input: one line of space-separated integers.
Output: each triplet on its own line with its values ascending; triplets ordered ascending (by first value, then second). Print none if there are no triplets.
Your program reads from stdin and prints to stdout.
Find all unique triplets a b c in the array such that a + b + c = 0.
Input: one line of space-separated integers.
Output: each triplet on its own line with its values ascending; triplets ordered ascending (by first value, then second). Print none if there are no triplets.
Your program reads from stdin and prints to stdout.