play out the activity: select two diverse lists i,j (1≤i,j≤n, i≠j) and two integers x,y (1≤x,y≤2⋅109) so that min(ai,aj)=min(x,y). Then, at that point, change computer based intelligence to x and aj to y. The young lady requests that you make the exhibit great utilizing all things considered n activities. It tends to be demonstrated that this is consistently conceivable
Correct answer will be upvoted else downvoted.
You can play out the activity: select two diverse lists i,j (1≤i,j≤n, i≠j) and two integers x,y (1≤x,y≤2⋅109) so that min(ai,aj)=min(x,y). Then, at that point, change computer based intelligence to x and aj to y.
The young lady requests that you make the exhibit great utilizing all things considered n activities.
It tends to be demonstrated that this is consistently conceivable.
Input
The main line contains a solitary integer t (1≤t≤10000) — the number of experiments.
The main line of each experiment contains a solitary integer n (1≤n≤105) — the length of the exhibit.
The second line of each experiment contains n integers a1,a2,… ,an (1≤ai≤109) — the exhibit which Nastia has gotten as a gift.
It's dependable that the amount of n in one test doesn't surpass 2⋅105.
Output
For every one of t experiments print a solitary integer k (0≤k≤n) — the number of tasks. You don't have to limit this number.
In every one of the following k lines print 4 integers I, j, x, y (1≤i≠j≤n, 1≤x,y≤2⋅109) so that min(ai,aj)=min(x,y) — as such you supplant
In case there are numerous replies, print any.
Step by step
Solved in 3 steps with 1 images