コード例 #1
0
        static void Main(string[] args)
        {
            var firstCircle  = Circle.ReadCircle();
            var secondCircle = Circle.ReadCircle();

            Console.WriteLine(Circle.Intersect(firstCircle, secondCircle) ?
                              "Yes" : "No");
        }
コード例 #2
0
 private static void PrintResult(Circle firstCircle, Circle secondCircle)
 {
     if (Circle.Intersect(firstCircle, secondCircle))
     {
         Console.WriteLine("Yes");
     }
     else
     {
         Console.WriteLine("No");
     }
 }
コード例 #3
0
        static void Main()
        {
            var firstCirleInput   = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var secondCircleInput = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            Point firstCenter  = new Point(firstCirleInput[0], firstCirleInput[1]);
            Point secondCenter = new Point(secondCircleInput[0], secondCircleInput[1]);

            Circle firstCircle  = new Circle(firstCenter, firstCirleInput[2]);
            Circle secondCircle = new Circle(secondCenter, secondCircleInput[2]);

            if (Circle.Intersect(firstCircle, secondCircle))
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }
コード例 #4
0
        static void Main(string[] args)
        {
            int[] firstCircleCoordinate  = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            int[] secondCircleCoordinate = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            Point firstPoint  = new Point(firstCircleCoordinate[0], firstCircleCoordinate[1]);
            Point secondPoint = new Point(secondCircleCoordinate[0], secondCircleCoordinate[1]);

            Circle firstCircle  = new Circle(firstPoint, firstCircleCoordinate[2]);
            Circle secondCircle = new Circle(secondPoint, secondCircleCoordinate[2]);

            //Console.WriteLine(Circle.Intersect(firstCircle, secondCircle) ? "Yes" : "No");

            if (Circle.Intersect(firstCircle, secondCircle))
            {
                Console.WriteLine("Yes");
            }
            else
            {
                Console.WriteLine("No");
            }
        }