using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { public void Proc() { Reader.IsDebug = false; int coinCount = int.Parse(Reader.ReadLine()); List coinList = new List(); for(int i=0; i a.X < newCoin.X + 20 && a.X > newCoin.X - 20 && a.Y < newCoin.Y + 20 && a.Y > newCoin.Y - 20).ToList().ForEach((b)=>{ if(newCoin.IsKasanaru(b)) { isKasanari = true; } }); if(!isKasanari) { coinList.Add(newCoin); } } Console.WriteLine(coinList.Count); } public class Ichien { public long X; public long Y; public int R = 10; public Ichien(int[] pos) { this.X = pos[0]; this.Y = pos[1]; } public bool IsKasanaru(Ichien target) { long range = ((this.X - target.X) * (this.X - target.X)) + ((this.Y - target.Y) * (this.Y - target.Y)); return (this.R + target.R) * (this.R + target.R) > range; } } public class Reader { public static bool IsDebug = true; private static String PlainInput = @" 2 100 100 112 116 "; private static System.IO.StringReader Sr = null; public static string ReadLine() { if (IsDebug) { if (Sr == null) { Sr = new System.IO.StringReader(PlainInput.Trim()); } return Sr.ReadLine(); } else { return Console.ReadLine(); } } public static int[] GetInt(char delimiter = ' ', bool trim = false) { string inptStr = ReadLine(); if (trim) { inptStr = inptStr.Trim(); } string[] inpt = inptStr.Split(delimiter); int[] ret = new int[inpt.Length]; for (int i = 0; i < inpt.Length; i++) { ret[i] = int.Parse(inpt[i]); } return ret; } } static void Main() { Program prg = new Program(); prg.Proc(); } }