forked from Sahaj-Bamba/HacktoberTrial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGUI2
More file actions
53 lines (52 loc) · 1.09 KB
/
GUI2
File metadata and controls
53 lines (52 loc) · 1.09 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <bits/stdc++.h>
#include <algorithm>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ass 1e18
#define MOD 1000000007
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define boost ios_base::sync_with_stdio(false);cin.tie(NULL);
#define debug(x) cout << #x << ": " << x << endl;
#define debug2(x,y) cout<<#x<<": "<< x<< ", "<< #y<< ": "<< y<< endl;
#define debug3(x,y,z) cout<<#x<<": "<< x<< ", "<< #y<< ": "<< y<<" "<<#z<<" : "<<z<< endl;
using namespace std;
typedef long long int ll;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<ll, null_type,less<ll>, rb_tree_tag,tree_order_statistics_node_update>
ll arr[200005];
int main()
{
boost
ll t,ans,e1,e2,o1,o2,a,n,m,i;
cin>>t;
while(t--)
{
cin>>n;
e1=0;o1=0;e2=0;o2=0;
for(i=0;i<n;i++)
{
cin>>a;
if(a%2==0)
e1++;
else
o1++;
}
cin>>m;
for(i=0;i<m;i++)
{
cin>>a;
if(a%2==0)
e2++;
else
o2++;
}
ans=e1*e2+o1*o2;
cout<<ans<<"\n";
}
return 0;
}