Skip to content

Instantly share code, notes, and snippets.

@JanhaviDadhania
Created January 21, 2021 11:20
Show Gist options
  • Save JanhaviDadhania/36ac7a5985d02b0ad54cd3662d26c652 to your computer and use it in GitHub Desktop.
Save JanhaviDadhania/36ac7a5985d02b0ad54cd3662d26c652 to your computer and use it in GitHub Desktop.
#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