#include<bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long n , a [200005] , sum;
vector < pair < long long , int > > v;
vector < int > ans;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    //freopen("milk.in","r",stdin);
    //freopen("milk.out","w",stdout);
    int t;
    cin >> t;
    while ( t -- )
    {
        cin >> n;
        sum = 0;
        for ( int i = 0 ; i < n ; i ++ )
        {
            cin >> a [i];
            v . push_back ( { a [i] , i } );
            sum += a [i];
        }
        sort ( v . begin () , v . end () );
        reverse ( v . begin () , v . end () );
        long long last = -1 , num = 0;
        for ( int i = 0 ; i < n ; i ++ )
        {
            long long x = v [i] . first , id = v [i] . second;
            sum -= x;
            if ( last == x ) num ++;
            else
            {
                last = x;
                num = 0;
            }
            if ( i == 0 )
            {
                ans . push_back ( id );
                continue;
            }
            if ( x + sum + last * num >= v [ i - 1 ] . first ) ans . push_back ( id );
            else break;
        }
        sort ( ans . begin () , ans . end () );
        cout << ans . size () << endl;
        for ( int i = 0 ; i < ans . size () ; i ++ ) cout << ans [i] + 1 << ' ';
        cout << endl;
        v . clear ();
        ans . clear ();
    }
}
