-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1248A.c
More file actions
36 lines (35 loc) · 699 Bytes
/
Copy path1248A.c
File metadata and controls
36 lines (35 loc) · 699 Bytes
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
#include <stdio.h>
int main(){
int t;
scanf("%d",&t);
while(t--){
long long int e1=0,e2=0,o1=0,o2=0;
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
int p;
scanf("%d",&p);
if(p%2==0){
e1++;
}
else{
o1++;
}
}
int m;
scanf("%d",&m);
for(int i=0;i<m;i++){
int q;
scanf("%d",&q);
if(q%2==0){
e2++;
}
else{
o2++;
}
}
long long int anon=(e1*e2)+(o1*o2);
printf("%lld\n",anon);
}
return 0;
}