Created
January 21, 2021 11:20
-
-
Save JanhaviDadhania/36ac7a5985d02b0ad54cd3662d26c652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int main() { | |
ios_base::sync_with_stdio(false); | |
cin.tie(NULL); | |
cout.tie(NULL); | |
int t; | |
cin>>t; | |
while(t--) { | |
vector<string> setOne; | |
vector<string> setTwo; | |
int a,b,n,m; | |
string s; | |
cin>>a>>b>>n>>m; | |
for(int i=0;i<n;i++) { | |
cin>>s; | |
setOne.push_back(s); | |
} | |
for(int i=0;i<m;i++) { | |
cin>>s; | |
setTwo.push_back(s); | |
} | |
long long elementsC = n + m; | |
long long elementsP = n*m; | |
long long t = elementsC * elementsP; | |
cout<<t<<endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment