blob: 2ca03398fc7f21ab145fb83b1e25cf25e617a0d7 (
plain)
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
|
#include <iostream>
#include <vector>
using std::vector;
int lcs3(vector<int> &a, vector<int> &b, vector<int> &c) {
//write your code here
return std::min(std::min(a.size(), b.size()), c.size());
}
int main() {
size_t an;
std::cin >> an;
vector<int> a(an);
for (size_t i = 0; i < an; i++) {
std::cin >> a[i];
}
size_t bn;
std::cin >> bn;
vector<int> b(bn);
for (size_t i = 0; i < bn; i++) {
std::cin >> b[i];
}
size_t cn;
std::cin >> cn;
vector<int> c(cn);
for (size_t i = 0; i < cn; i++) {
std::cin >> c[i];
}
std::cout << lcs3(a, b, c) << std::endl;
}
|