#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); int ts; cin >> ts; vi found; rep(t,0,ts) { int n; cin >> n; vi arr(n); rep(i,0,n) { cin >> arr[i]; } bool ok = true; for (int i = n-1; i >= 0; i--) { if (rand() % 1000 != 0) { continue; } int mx = -INF; for (int j = n-1; j > i; j--) { if (arr[j] < arr[i] && mx > arr[i]) { ok = false; break; } mx = max(mx, arr[j]); } } if (!ok) { found.push_back(t); } } cout << found.size() << endl; rep(i,0,found.size()) { cout << found[i]+1 << endl; } return 0; }