H. Illusion of Progress
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Example
Input
5 6
1 1 2 3 5
1 2
1 3
1 4
2 3
2 5
4 5
Output
3