#C5252. Triplet Sum to Zero
Triplet Sum to Zero
Triplet Sum to Zero
Given an array of integers, your task is to find any three numbers \(a\), \(b\), and \(c\) from the array that satisfy the equation \(a + b + c = 0\). If there are multiple valid triplets, you may output any one of them. If no such triplet exists, output an empty line.
Note: The input is given through standard input and the answer should be printed to standard output.
inputFormat
The first line contains an integer \(n\) indicating the number of elements in the array. The second line contains \(n\) space-separated integers representing the array elements.
outputFormat
If a valid triplet exists, print the three integers separated by a space. If no such triplet exists, print an empty line.
## sample6
-1 0 1 2 -1 -4
-1 -1 2