Problem E: 防守战线
Memory Limit:512 MB
Time Limit:3.000 S
Judge Style:Text Compare
Creator:
Submit:1
Solved:1
Description
Sample Input Copy
5 3
1 5 6 3 4
2 3 1
1 5 4
3 5 2
Sample Output Copy
11