There is an exhibit a1,a2,… ,an of n positive integers. You should isolate it into a negligible number of ceaseless portions, to such an extent that in each section there are no two numbers (on various positions), whose item is an ideal square. Also, it is permitted to do all things considered k such activities before the division: pick a number in the exhibit and change its worth to any certain integer. However, in this form k=0, so it isn't significant.
Correct answer will be upvoted else downvoted. Computer science.
There is an exhibit a1,a2,… ,an of n positive integers. You should isolate it into a negligible number of ceaseless portions, to such an extent that in each section there are no two numbers (on various positions), whose item is an ideal square.
Also, it is permitted to do all things considered k such activities before the division: pick a number in the exhibit and change its worth to any certain integer. However, in this form k=0, so it isn't significant.
What is the base number of consistent fragments you should utilize in the event that you will make changes ideally?
Input
The primary line contains a solitary integer t (1≤t≤1000) — the number of experiments.
The principal line of each experiment contains two integers n, k (1≤n≤2⋅105, k=0).
The second line of each experiment contains n integers a1,a2,… ,an (1≤
It's surefire that the amount of n over all experiments doesn't surpass 2⋅105.
Output
For each experiment print a solitary integer — the response to the issue.
Step by step
Solved in 3 steps with 1 images