#include<iostream>
using namespace std;
long st[50000];

 


int main()
{
    int casenum;
    cin>>casenum;
    while(casenum--)
    {
        int n;
        cin>>n;

        int i;
        st[1]=0;
        for(i=2;i<=n;i++)
            cin>>st[i];

        if(2==n || 3==n)
            cout<<0<<endl;
        else
        {
            long min=1000000000;
            int minpos=0;
            for(i=3;i<=n-1;i++)
                if(st[i]-st[i-1]<min)
                {
                    min=st[i]-st[i-1];
                    minpos=i;
                }

            cout<<st[n]+min<<endl;
            cout<<minpos<<" "<<1<<" "<<n<<" "<<minpos-1<<endl;
        }

        if(casenum)
            cout<<endl;
    }

    return 0;
}

 

相关文章:

  • 2021-07-31
  • 2021-05-16
  • 2021-09-08
  • 2021-12-08
  • 2021-10-07
  • 2021-11-08
猜你喜欢
  • 2022-02-12
  • 2021-10-01
  • 2022-01-11
  • 2022-12-23
  • 2021-07-06
  • 2021-05-28
  • 2022-01-05
相关资源
相似解决方案