title: Check Given String Can Split Four Distinct Strings
signature: function check_given_string_can_split_four_distinct_strings(s)
source_py: def check_given_string_can_split_four_distinct_strings(s):
      if (len(s) >= 10):
          return True
      for i in range(1, len(s)):
          for j in range((i + 1), len(s)):
              for k in range((j + 1), len(s)):
                  s1 = s[0:i]
                  s2 = s[i:(j - i)]
                  s3 = s[j:(k - j)]
                  s4 = s[k:(len(s) - k)]
                  if ((s1 != s2) and (s1 != s3) and (s1 != s4) and (s2 != s3) and (s2 != s4) and (s3 != s4)):
                      return True
      return False
source_cpp: bool check_given_string_can_split_four_distinct_strings(string s) {
    if ( s . size ( ) >= 10 ) return true;
    for ( int i = 1;
    i < s . size ( );
    i ++ ) {
      for ( int j = i + 1;
      j < s . size ( );
      j ++ ) {
        for ( int k = j + 1;
        k < s . size ( );
        k ++ ) {
          string s1 = s . substr ( 0, i );
          string s2 = s . substr ( i, j - i );
          string s3 = s . substr ( j, k - j );
          string s4 = s . substr ( k, s . size ( ) - k );
          if ( s1 != s2 && s1 != s3 && s1 != s4 && s2 != s3 && s2 != s4 && s3 != s4 ) return true;
        }
      }
    }
    return false;
  }
question_info.entry_fn_name: check_given_string_can_split_four_distinct_strings
question_info.entry_cls_name: Solution
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
question_info.test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return isCorrect(actual,expected)
  end
  
  function driver(s, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(s) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver("WKTj Nw", false)
      print(string.format("TEST-0...%s",result))
  
      result = driver("8235021", false)
      print(string.format("TEST-1...%s",result))
  
      result = driver("0101", false)
      print(string.format("TEST-2...%s",result))
  
      result = driver("BLMhiQsQcFla", true)
      print(string.format("TEST-3...%s",result))
  
      result = driver("00363175722", true)
      print(string.format("TEST-4...%s",result))
  
      result = driver("10000", false)
      print(string.format("TEST-5...%s",result))
  
      result = driver("aqEYWNd bqgye", true)
      print(string.format("TEST-6...%s",result))
  
      result = driver("83", false)
      print(string.format("TEST-7...%s",result))
  
      result = driver("000011110111", true)
      print(string.format("TEST-8...%s",result))
  
      result = driver("E", false)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"s": "WKTj Nw"}}, {"idx": 1, "outputs": false, "inputs": {"s": "8235021"}}, {"idx": 2, "outputs": false, "inputs": {"s": "0101"}}, {"idx": 3, "outputs": true, "inputs": {"s": "BLMhiQsQcFla"}}, {"idx": 4, "outputs": true, "inputs": {"s": "00363175722"}}, {"idx": 5, "outputs": false, "inputs": {"s": "10000"}}, {"idx": 6, "outputs": true, "inputs": {"s": "aqEYWNd bqgye"}}, {"idx": 7, "outputs": false, "inputs": {"s": "83"}}, {"idx": 8, "outputs": true, "inputs": {"s": "000011110111"}}, {"idx": 9, "outputs": false, "inputs": {"s": "E"}}]