title: Check Given String Can Split Four Distinct Strings
signature: bool checkGivenStringCanSplitFourDistinctStrings(string s) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(bool actual, bool expected){
      return actual == expected;
  }
  
  string driver(string s, bool expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(s), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver("WKTj Nw", false); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      result = driver("8235021", false); 
      cout << "TEST-" << 1 << "..."
           <<  result
           << "\n";
  
      result = driver("0101", false); 
      cout << "TEST-" << 2 << "..."
           <<  result
           << "\n";
  
      result = driver("BLMhiQsQcFla", true); 
      cout << "TEST-" << 3 << "..."
           <<  result
           << "\n";
  
      result = driver("00363175722", true); 
      cout << "TEST-" << 4 << "..."
           <<  result
           << "\n";
  
      result = driver("10000", false); 
      cout << "TEST-" << 5 << "..."
           <<  result
           << "\n";
  
      result = driver("aqEYWNd bqgye", true); 
      cout << "TEST-" << 6 << "..."
           <<  result
           << "\n";
  
      result = driver("83", false); 
      cout << "TEST-" << 7 << "..."
           <<  result
           << "\n";
  
      result = driver("000011110111", true); 
      cout << "TEST-" << 8 << "..."
           <<  result
           << "\n";
  
      result = driver("E", false); 
      cout << "TEST-" << 9 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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;
  }