K. K-restricted Induced Subgraphs
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Examples
Input
5 4 3
1 2 3 4 5
1 2
2 3
3 4
4 5
Output
4
Input
7 8 2
3 4 6 5 6 5 7
1 3
1 6
2 6
2 3
6 7
2 7
2 4
2 5
Output
5
Input
4 4 1
100 100 100 100
1 2
2 3
3 4
4 1
Output
4