aspi
BAN USER- 0of 0 votes
AnswersA smart-set is a set of distinct numbers in which all the elements have the same number of 1s in their binary form. The set of all smallest elements from each smart-set
- aspi in United States
that can be formed from a given array of distinct positive numbers is known as the smartest-set.
So given an array of distinct numbers, outline the elements of the smartest-set in ascending sorted order.
Input Format
The first line of input consists of an integer t. This is the number of test cases. For each test case,
the first line of input contains an integer n. Here n is the number of elements in the array. The next line contains n space separated distinct integers which are the elements
of the array.
Output Format
The output will space separated integer elements of the smartest-set in ascending order.
Constraints
0 < t < 1000 (This is the number of test cases
2 < n < 10000 (This is the number of integer elements of the array)
1 < Xi < 100000 (This is the size of each element of the array)
Python coding| Report Duplicate | Flag | PURGE
Python
RepPennyStringer, Music director at Poore Simon's
I am a Music director and writer and live in Newark USA . I spend most of my time writing essays ...