-
Notifications
You must be signed in to change notification settings - Fork 0
/
1880.cpp
51 lines (45 loc) · 1.03 KB
/
1880.cpp
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
// Author : Mars_Coder
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
using namespace std;
#define PI 3.141592653589793238462643383279502884L
#define ln "\n" // no flush, oppos of endl
#define _flush endl
#define stop_sync ios::sync_with_stdio(false) // not to use c-stye io
#define untie_ios cin.tie(nullptr) // no flush
#define sz(x) (x).size()
#define lli long long int
#define FIXED(x) cout << fixed << setprecision(x)
bool ls(vector<int> arr, int tg){
for(int i = 0; i < sz(arr); ++i){
if(arr[i] == tg) return true;
}
return false;
}
int main(void){
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
freopen("error.txt", "w", stderr);
#endif
int n, ai;
cin >> n;
vector<int> a1(n);
for(int i = 0; i < n; ++i){
cin >> a1[i];
}
cin >> n;
vector<int> a2(n);
//cout << sz(a2) << ln;
for(int i = 0; i < n; ++i){
cin >> a2[i];
}
int ans = 0;
cin >> n;
for(int i = 0; i < n; ++i){
cin >> ai;
if(ls(a1, ai) && ls(a2, ai)) ++ans;
}
cout << ans << ln;
return 0;
}