# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562063 | 2022-05-14T05:06:23 Z | jh05013 | Lonely mdic (kriii1_L) | Java 11 | 0 ms | 0 KB |
import java.awt.geom.*; import java.util.*; import java.io.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); StringBuilder sb = new StringBuilder(); int n = sc.nextInt(); List<Area> circs = new Vector(); for(int i = 0; i < n; i++){ double x = sc.nextDouble(); double y = sc.nextDouble(); double r = sc.nextDouble(); Ellipse2D.Double c = new Ellipse2D.Double(x-r, y-r, 2*r, 2*r); Area car = new Area(c); circs.add(car); } int ans = 0; for(int i = 0; i < n; i++){ Area a = (Area) circs.get(i).clone(); for(int j = 0; j < n; j++) if(i != j) a.subtract(circs.get(j)); if(a.isEmpty()) ans++; } sb.append(ans); System.out.println(sb); } }