title: Check Given Circle Lies Completely Inside Ring Formed Two Concentric Circles
signature: func checkGivenCircleLiesCompletelyInsideRingFormedTwoConcentricCircles(r0 int, r10 int, r11 int, x1 int, y1 int) bool {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual bool, expected bool) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(r0 int, r10 int, r11 int, x1 int, y1 int, expected bool) string {
      if validateSolution(PLACEHOLDER_FN_NAME(r0, r10, r11, x1, y1),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(8, 
  	4, 
  	2, 
  	6, 
  	0, true)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(400, 
  	1, 
  	10, 
  	74, 
  	38, true)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(1, 
  	400, 
  	10, 
  	74, 
  	38, false)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(61, 
  	40, 
  	2, 
  	50, 
  	0, true)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(60, 
  	49, 
  	68, 
  	77, 
  	71, false)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(88, 
  	10, 
  	69, 
  	71, 
  	26, false)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(60, 
  	79, 
  	92, 
  	29, 
  	38, false)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(26, 
  	88, 
  	75, 
  	84, 
  	10, false)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(33, 
  	65, 
  	57, 
  	21, 
  	61, false)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(70, 
  	57, 
  	77, 
  	52, 
  	87, false)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def check_given_circle_lies_completely_inside_ring_formed_two_concentric_circles(r, R, r1, x1, y1):
      dis = int(math.sqrt(((x1 * x1) + (y1 * y1))))
      return (((dis - r1) >= R) and ((dis + r1) <= r))
source_cpp: bool check_given_circle_lies_completely_inside_ring_formed_two_concentric_circles(int r, int R, int r1, int x1, int y1) {
    int dis = sqrt ( x1 * x1 + y1 * y1 );
    return ( dis - r1 >= R && dis + r1 <= r );
  }