-

1

1 votes
Medium
Problem
Sample Input
3
4 3 4
4 3 1
5 1 2
Sample Output
12
-1
2
Time Limit: 0.5
Memory Limit: 256
Source Limit:
Editor Image

?