Drivers Code
public static void main ( String [ ] args ) { double [ ] [ ] arr = { { 2.1 , 3.0 } , { 3.7 , 1.2 } , { 1.5 , 6.5 } , { 1.2 , 0.0 } } ; int [ ] Q = { 2 , 8 , 5 } ; int N = arr . length ; int M = Q . length ; query ( arr , Q ) ; } }