Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- #define pb push_back
- int main()
- {
- _test
- {
- int n;
- cin>>n;
- vector<int> a(n), b(n);
- for(auto &e: a) cin>>e;
- for(auto &e: b) cin>>e;
- vector<int> c;
- for(int i=0; i<n; i++)
- c.pb(a[i] - b[i]);
- vector<int> ans;
- int x = *max_element(c.begin(), c.end());
- for(int i=0; i<n; i++)
- {
- if(x == c[i])
- ans.pb(i+1);
- }
- cout<<ans.size()<<"\n";
- for(auto e: ans)
- cout<<e<<" ";
- cout<<"\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment