Srinath and sub-arrays
CodeChefOpen on judge ↗
Srinath’s teacher has given a task to find all the possible subsequences of size 3 in an array of length N whose sum is equal to the provided number S. If there is no such subsequence print -1. Can you help him? ### Input First line contains an integer N,S and the elements of the array in the following line. ### Output Display all the possible subsequences possible. ### Constraints - $1 \leq T
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start