1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39#include<iostream>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int n;
cin >> n;
vector<int> a(n),b(n);
for(int i = 0; i < n; i++){
cin >> a[i];
}
for(int i = 0; i < n; i++){
cin >> b[i];
}
vector<pair<int,int> > diff;
for(int i = 0; i < n; i++){
diff.push_back(make_pair(a[i]-b[i],i));
}
sort(diff.begin(),diff.end());
int maxi = diff[diff.size()-1].first;
vector<int> ans;
for(int i = 0; i < n; i++){
if(diff[i].first == maxi){
ans.push_back(diff[i].second + 1);
}
}
cout << ans.size() << endl;
for(auto it : ans){
cout << it << " ";
}
cout << endl;
}
return 0;
}