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.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Operations Research : Applications and Algorithms](https://www.bartleby.com/isbn_cover_images/9780534380588/9780534380588_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![Operations Research : Applications and Algorithms](https://www.bartleby.com/isbn_cover_images/9780534380588/9780534380588_smallCoverImage.gif)
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.](https://www.bartleby.com/isbn_cover_images/9781337569798/9781337569798_smallCoverImage.gif)