using System.Collections.Generic;
public static void Main()
var result = new Ray().solution(new Point2D[] {
new Point2D { x = -1, y = -2 },
new Point2D { x = 1, y = 2 },
new Point2D { x = 2, y = 4 },
Console.WriteLine(result);
var result2 = new Ray().solution(new Point2D[] {
new Point2D { x = -1, y = -2 },
new Point2D { x = 1, y = 2 },
new Point2D { x = 2, y = 4 },
new Point2D { x = -2, y = -4 },
new Point2D { x = 5, y = 5 },
new Point2D { x = 1, y = 1 },
new Point2D { x = -2, y = -2 },
Console.WriteLine(result2);
public int solution(Point2D[] A)
List<double> coss = new List<double>();
foreach(Point2D point in A)
var h = Math.Sqrt(point.x * point.x + point.y * point.y);
if(!coss.Contains(Math.Abs(cos))) {