## GUPTA MECHANICAL

IN THIS WEBSITE I CAN TELL ALL ABOUT TECH. TIPS AND TRICKS APP REVIEWS AND UNBOXINGS ALSO TECH. NEWS .............

## [Solution] Make them Zero CodeChef Solution | CodeChef Problem Solution 2022

You are given an array $A$ of length $N$.

You can perform the following operation on the array any number of times:

• Choose any subsequence $S$ of the array $A$ and a positive integer $X$ such that $X$ is a power of $2$ and subtract $X$ from all the elements of the subsequence $S$.

Find the minimum number of operations required to make all the elements of the array equal to $0$.

### Input Format

• First line will contain $T$, number of test cases. Then the test cases follow.
• First line of each test case contains an integer $N$ denoting the length of the array $A$.

## Age Limit Codechef SolutionEqual Distribution Codechef SolutionMinimum number of Flips CodeChef SolutionDivisible by 3 CodeChef SolutionHow Many Maximums CodeChef SolutionMinimum or Maximum CodeChef Solution Maximise Set Bits CodeChef SolutionSorting Array CodeChef SolutionConstruct An Array CodeChef Solution

• Second line contains $N$ space-separated integers ${A}_{1},{A}_{2},\dots ,{A}_{N}$ - denoting the elements of array $A$.

### Output Format

For each test case, output in a single line, the minimum number of moves required to make all the elements of the array $A$ equal to $0$.

### Constraints

• $1\le T\le 1000$
• $1\le N\le {10}^{5}$
• $0\le {A}_{i}\le {10}^{9}$
• Sum of $N$ over all test cases do not exceed $2\cdot {10}^{5}$.