title: Count Pairs Two Sorted Arrays Whose Sum Equal Given Value X
signature: def count_pairs_two_sorted_arrays_whose_sum_equal_given_value_x(arr1, arr2, m, n, x):
source_py: def count_pairs_two_sorted_arrays_whose_sum_equal_given_value_x(arr1, arr2, m, n, x):
      count = 0
      for i in range(m):
          for j in range(n):
              if ((arr1[i] + arr2[j]) == x):
                  count = (count + 1)
      return count
source_cpp: int count_pairs_two_sorted_arrays_whose_sum_equal_given_value_x(vector<int> arr1, vector<int> arr2, int m, int n, int x) {
    int count = 0;
    for ( int i = 0;
    i < m;
    i ++ ) for ( int j = 0;
    j < n;
    j ++ ) if ( ( arr1 [ i ] + arr2 [ j ] ) == x ) count ++;
    return count;
  }
question_info.test_code: import array
  import bisect
  import collections
  import datetime
  import functools
  import heapq
  import itertools
  import math
  import queue
  import re
  import string
  import sys
  from typing import Any, Dict, List, Optional, Set
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  def validate_solution(actual, expected):
      return actual == expected
  
  def driver(arr1, arr2, m, n, x, expected):
      try:
          if validate_solution(PLACEHOLDER_FN_NAME(
              arr1, arr2, m, n, x),
              expected
          ):
              return "PASSED"
          return "FAILED"
      except Exception as exception_obj:
          return type(exception_obj).__name__
      
  if __name__ == "__main__":
      result = driver([11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98], [1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88], 9, 15, 11, 0)
      print(f"TEST-0...{result}")
  
      result = driver([50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50], [34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76], 11, 12, 8, 5)
      print(f"TEST-1...{result}")
  
      result = driver([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], 14, 9, 12, 0)
      print(f"TEST-2...{result}")
  
      result = driver([88, 14, 29, 87, 86, 58], [91, 95, 64, 4, 63, 35], 3, 5, 5, 0)
      print(f"TEST-3...{result}")
  
      result = driver([-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94], [-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98], 34, 32, 23, 0)
      print(f"TEST-4...{result}")
  
      result = driver([1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], [1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0], 39, 26, 34, 0)
      print(f"TEST-5...{result}")
  
      result = driver([70, 70, 74], [15, 55, 84], 1, 1, 1, 0)
      print(f"TEST-6...{result}")
  
      result = driver([-20, -12, -50, 76, 24, 64, -22, -4, -68], [18, 98, -88, 86, 72, -44, 82, 94, 58], 5, 4, 7, 0)
      print(f"TEST-7...{result}")
  
      result = driver([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], 27, 26, 37, 0)
      print(f"TEST-8...{result}")
  
      result = driver([68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50], [4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88], 10, 10, 9, 0)
      print(f"TEST-9...{result}")
  
      sys.exit(0)
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.entry_fn_name: count_pairs_two_sorted_arrays_whose_sum_equal_given_value_x
question_info.test_list: [{"idx": 0, "outputs": 0, "inputs": {"arr1": [11, 13, 16, 23, 26, 28, 31, 34, 37, 39, 44, 48, 56, 59, 79, 91, 96, 98], "arr2": [1, 1, 9, 14, 17, 23, 26, 31, 33, 36, 53, 60, 71, 75, 76, 84, 87, 88], "m": 9, "n": 15, "x": 11}}, {"idx": 1, "outputs": 5, "inputs": {"arr1": [50, 14, -98, 14, 90, 36, 66, 44, 10, -98, -24, -36, -32, -50], "arr2": [34, -6, -66, 0, -6, 82, 60, -98, -8, 60, -2, 4, 22, 76], "m": 11, "n": 12, "x": 8}}, {"idx": 2, "outputs": 0, "inputs": {"arr1": [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], "arr2": [0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1], "m": 14, "n": 9, "x": 12}}, {"idx": 3, "outputs": 0, "inputs": {"arr1": [88, 14, 29, 87, 86, 58], "arr2": [91, 95, 64, 4, 63, 35], "m": 3, "n": 5, "x": 5}}, {"idx": 4, "outputs": 0, "inputs": {"arr1": [-98, -92, -88, -86, -82, -76, -72, -66, -56, -48, -34, -28, -28, -26, -20, -18, -18, -16, -16, -12, -4, 0, 6, 12, 16, 20, 22, 30, 34, 34, 36, 56, 58, 62, 64, 80, 82, 94], "arr2": [-94, -90, -88, -84, -82, -78, -76, -72, -70, -58, -58, -46, -42, -40, -40, -32, -22, -20, -18, -12, -8, -6, 6, 6, 18, 20, 34, 46, 60, 62, 66, 72, 72, 76, 76, 78, 92, 98], "m": 34, "n": 32, "x": 23}}, {"idx": 5, "outputs": 0, "inputs": {"arr1": [1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0], "arr2": [1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0], "m": 39, "n": 26, "x": 34}}, {"idx": 6, "outputs": 0, "inputs": {"arr1": [70, 70, 74], "arr2": [15, 55, 84], "m": 1, "n": 1, "x": 1}}, {"idx": 7, "outputs": 0, "inputs": {"arr1": [-20, -12, -50, 76, 24, 64, -22, -4, -68], "arr2": [18, 98, -88, 86, 72, -44, 82, 94, 58], "m": 5, "n": 4, "x": 7}}, {"idx": 8, "outputs": 0, "inputs": {"arr1": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], "arr2": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], "m": 27, "n": 26, "x": 37}}, {"idx": 9, "outputs": 0, "inputs": {"arr1": [68, 75, 51, 45, 73, 95, 48, 53, 70, 41, 65, 47, 46, 43, 79, 29, 50], "arr2": [4, 6, 76, 65, 16, 13, 85, 43, 31, 14, 81, 90, 24, 87, 40, 25, 88], "m": 10, "n": 10, "x": 9}}]
question_info.entry_cls_name: Solution