Driver code
public static void Main ( String [ ] args ) { int [ ] A = { 0 , 0 , 0 , 0 , 0 , 0 } ; int [ , ] R = { { 1 , 3 } , { 4 , 6 } , { 3 , 4 } , { 3 , 3 } } ; int N = A . Length ; int M = R . GetLength ( 0 ) ; Console . Write ( uniqueSum ( A , R , N , M ) ) ; } }