#C2669. Three Sum Existence
Three Sum Existence
Three Sum Existence
Given a list of integers and a target integer \(T\), determine if there exist three distinct elements in the list that sum up exactly to \(T\). Formally, for a list \(a_1, a_2, \ldots, a_n\), find whether there exist indices \(i, j, k\) (all distinct) such that \(a_i + a_j + a_k = T\).
inputFormat
The first line of input contains two integers: \(n\) (the number of elements) and \(T\) (the target sum). The second line contains \(n\) space-separated integers representing the list.
outputFormat
Output a single line containing either "True" or "False" indicating whether such a triplet exists.
## sample6 7
2 4 8 -1 3 5
True