title: Check Given String Can Split Four Distinct Strings
signature: class Solution {
  
      public bool CheckGivenStringCanSplitFourDistinctStrings(string s) {
test_code: using System;
  using System.Numerics;
  using System.Diagnostics;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Security.Cryptography;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  namespace EvaluatePrediction {
      class TestRunner {
          public bool ValidateSolution(bool actual, bool expected){
              return new JavaScriptSerializer().Serialize(actual) == new JavaScriptSerializer().Serialize(expected);
          }
  
          public string driver(string s, bool expected){
              try{
                PLACEHOLDER_CLS_NAME solution_cls = new PLACEHOLDER_CLS_NAME();
                bool pred_result = solution_cls.PLACEHOLDER_FN_NAME(s); 
                if (ValidateSolution(
                      pred_result,
                      expected)){
                  return "PASSED";
                }
                return "FAILED";
              } 
              catch (Exception exception_obj)
              {
                return exception_obj.GetType().FullName;
              }
          }
          static void Main(string[] args) {
              TestRunner runner = new TestRunner();
              String result;
              result = runner.driver(
                  "WKTj Nw", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-0...{0}",
                  result)
              );result = runner.driver(
                  "8235021", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-1...{0}",
                  result)
              );result = runner.driver(
                  "0101", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-2...{0}",
                  result)
              );result = runner.driver(
                  "BLMhiQsQcFla", 
                  true
              );
              Console.WriteLine(string.Format(
                  "TEST-3...{0}",
                  result)
              );result = runner.driver(
                  "00363175722", 
                  true
              );
              Console.WriteLine(string.Format(
                  "TEST-4...{0}",
                  result)
              );result = runner.driver(
                  "10000", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-5...{0}",
                  result)
              );result = runner.driver(
                  "aqEYWNd bqgye", 
                  true
              );
              Console.WriteLine(string.Format(
                  "TEST-6...{0}",
                  result)
              );result = runner.driver(
                  "83", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-7...{0}",
                  result)
              );result = runner.driver(
                  "000011110111", 
                  true
              );
              Console.WriteLine(string.Format(
                  "TEST-8...{0}",
                  result)
              );result = runner.driver(
                  "E", 
                  false
              );
              Console.WriteLine(string.Format(
                  "TEST-9...{0}",
                  result)
              );
          }
      }
  }
  
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;
  }