title: Check Two Given Circles Touch Intersect
signature: class Solution {
  
      public Integer checkTwoGivenCirclesTouchIntersect(Integer x1, Integer y1, Integer x2, Integer y2, Integer r1, Integer r2) {
source_py: def check_two_given_circles_touch_intersect(x1, y1, x2, y2, r1, r2):
      distSq = (((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2)))
      radSumSq = ((r1 + r2) * (r1 + r2))
      if (distSq == radSumSq):
          return 1
      elif (distSq > radSumSq):
          return (- 1)
      else:
          return 0
source_cpp: int check_two_given_circles_touch_intersect(int x1, int y1, int x2, int y2, int r1, int r2) {
    int distSq = ( x1 - x2 ) * ( x1 - x2 ) + ( y1 - y2 ) * ( y1 - y2 );
    int radSumSq = ( r1 + r2 ) * ( r1 + r2 );
    if ( distSq == radSumSq ) return 1;
    else if ( distSq > radSumSq ) return - 1;
    else return 0;
  }
question_info.extension: java
question_info.entry_fn_name: checkTwoGivenCirclesTouchIntersect
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": -1, "inputs": {"x1": 11, "y1": 36, "x2": 62, "y2": 64, "r1": 50, "r2": 4}}, {"idx": 1, "outputs": 0, "inputs": {"x1": 87, "y1": 1, "x2": 62, "y2": 64, "r1": 54, "r2": 41}}, {"idx": 2, "outputs": -1, "inputs": {"x1": 51, "y1": 1, "x2": 47, "y2": 90, "r1": 14, "r2": 71}}, {"idx": 3, "outputs": 0, "inputs": {"x1": 89, "y1": 67, "x2": 9, "y2": 52, "r1": 94, "r2": 21}}, {"idx": 4, "outputs": 0, "inputs": {"x1": 64, "y1": 10, "x2": 79, "y2": 45, "r1": 67, "r2": 78}}, {"idx": 5, "outputs": 0, "inputs": {"x1": 57, "y1": 86, "x2": 99, "y2": 43, "r1": 83, "r2": 63}}, {"idx": 6, "outputs": 0, "inputs": {"x1": 65, "y1": 90, "x2": 42, "y2": 82, "r1": 77, "r2": 32}}, {"idx": 7, "outputs": 0, "inputs": {"x1": 32, "y1": 23, "x2": 28, "y2": 26, "r1": 60, "r2": 45}}, {"idx": 8, "outputs": 0, "inputs": {"x1": 73, "y1": 61, "x2": 63, "y2": 77, "r1": 92, "r2": 76}}, {"idx": 9, "outputs": -1, "inputs": {"x1": 3, "y1": 99, "x2": 6, "y2": 19, "r1": 21, "r2": 28}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer x1, Integer y1, Integer x2, Integer y2, Integer r1, Integer r2, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(x1, y1, x2, y2, r1, r2,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(11, 36, 62, 64, 50, 4, -1);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(87, 1, 62, 64, 54, 41, 0);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(51, 1, 47, 90, 14, 71, -1);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(89, 67, 9, 52, 94, 21, 0);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(64, 10, 79, 45, 67, 78, 0);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(57, 86, 99, 43, 83, 63, 0);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(65, 90, 42, 82, 77, 32, 0);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(32, 23, 28, 26, 60, 45, 0);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(73, 61, 63, 77, 92, 76, 0);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(3, 99, 6, 19, 21, 28, -1);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer x1, Integer y1, Integer x2, Integer y2, Integer r1, Integer r2, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(x1, y1, x2, y2, r1, r2),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__