title: Check Given String Can Split Four Distinct Strings
signature: class Solution {
  
      public Boolean checkGivenStringCanSplitFourDistinctStrings(String s) {
test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(String s, Boolean expected){
          try{
              Driver driver = new Driver();
              if (driver.run(s,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution("WKTj Nw", false);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution("8235021", false);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution("0101", false);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution("BLMhiQsQcFla", true);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution("00363175722", true);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution("10000", false);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution("aqEYWNd bqgye", true);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution("83", false);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution("000011110111", true);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution("E", false);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(String s, Boolean expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(s),expected);
      }
      
      public boolean validateSolution(Boolean actual, Boolean expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
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;
  }