how the output is generated for eg:
9 3
1 10 10
1 9 9
1 -8 -8
2
1 7 7
2
1 6 6
1 5 5
2
first type -2 output is 128,162,200
second type -2 output is 98,128,162
and final output is 50,72,98
the output given in the test case is 200 ,162,98
can anyone explain thanks in advance