# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562065 | 2022-05-14T05:07:17 Z | jh05013 | Lonely mdic (kriii1_L) | Java 11 | 2000 ms | 24484 KB |
import java.awt.geom.*; import java.util.*; import java.io.*; public class L { 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); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 947 ms | 24484 KB | Output is correct |
2 | Correct | 1257 ms | 21412 KB | Output is correct |
3 | Execution timed out | 2074 ms | 22352 KB | Time limit exceeded |
4 | Halted | 0 ms | 0 KB | - |