Driver code
static void Main ( ) { int [ ] arr = { 5 , 9 , 1 , 8 } ; int [ ] brr = { 10 , 12 , 7 , 4 , 2 , 3 } ; int K = 3 ; int N = arr . Length ; int M = brr . Length ; Console . WriteLine ( count_pairs ( arr , brr , N , M , K ) ) ; } }