Untitled
unknown
plain_text
2 years ago
458 B
4
Indexable
You are given an array A of size n and an integer b. You have to find outall pairs of elements from array A whose sum is equal to b and print them. Inthe first line, you are given 2 integers, n (size of array) and b. In the next line,you are given n integers (the elements of array A). You have to output all pairsof elements from array A whose sum is equal to b. Output each new pair in anew line.Example:Input:5 5 where n = 5 b = 51 2 3 4 5Output1 42 3
Editor is loading...