PVHOI 5 bài 5 - FMVP ở tuổi 28 - Ai cản được Quỷ Vương Bất Tử? (70 điểm)

View as PDF

Submit solution


Points: 1.50 (partial)
Time limit: 1.75s
Memory limit: 512M
Input: fakerfmvp.inp
Output: fakerfmvp.out

Author:
Problem source:
PVHOI 5
Problem types
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

Please read the guidelines before commenting.



  • 1
    skyvn97  commented on March 4, 2025, 3:56 p.m.

    Các bạn xem đề bài ở đây nhé: https://oj.vnoi.info/problem/pvh5_d


  • 0
    anhkhoanguyentran17  commented on Feb. 20, 2025, 8:53 a.m.

    input4

    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 34 2 -1 2 output


  • -9
    LA_NTTANH  commented on Dec. 22, 2024, 9:58 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.