Problem P: GESP 四 202503-编程2

Problem P: GESP 四 202503-编程2

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

Sample Input Copy

3 4
1 2 1 0
2 4 2 1
0 3 3 0

Sample Output Copy

2