You have a rectangular grid of dimension 2 x N. You need to find out the maximum sum such that no two chosen numbers are adjacent, vertically, diagonally or horizontally, .
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N,number of columns in a grid.
Next two lines describes the 2*N grid.
Print the output for each test case in a seprate line.
1 <=T<= 100
1 <=N<= 100
0 <=arr[i]<= 70
1 4 5
2 0 0
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.