Submit solution
Points:
1.50 (partial)
Time limit:
1.75s
Memory limit:
512M
Input:
fakerfmvp.inp
Output:
fakerfmvp.out
Author:
Problem source:
Problem type
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch
Input
Output
Sample Input 1
4
5 4 0
1 2
2 3
5 4
4 3
5 0 4
1 2
2 3
5 4
4 3
3 2 1
1 2
2 3
1 3
3 1 2
1 2
2 3
1 3
Sample Output 1
4
2
-1
2
Comments
This comment is hidden due to too much negative feedback. Show it anyway.