#include using namespace std; #define rep(i,a,b) for (auto i=(a); i<(b); ++i) #define iter(it,c) for (auto it = (c).begin(); it != (c).end(); ++it) typedef pair ii; typedef vector vi; typedef vector vii; typedef vector vvi; typedef long long ll; const int INF = 2147483647; int main() { cin.sync_with_stdio(false); clock_t start = clock(); int ts; cin >> ts; vi found; rep(t,0,ts) { int n; cin >> n; vi arr(n); rep(i,0,n) { cin >> arr[i]; } vi perm(n); rep(i,0,n) { perm[i] = i; } random_shuffle(perm.begin(), perm.end()); bool ok = true; rep(at,0,n) { int i = perm[at]; bool below = false; rep(j,i+1,n) { if (arr[j] < arr[i]) { below = true; } if (arr[j] > arr[i] && below) { ok = false; break; } } if (!ok) { break; } clock_t cur = clock(); if (static_cast(cur - start) / CLOCKS_PER_SEC > 1.9) { break; } } if (!ok) { found.push_back(t); } } cout << found.size() << endl; iter(it,found) { cout << *it+1 << endl; } return 0; }