# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562065 | jh05013 | Lonely mdic (kriii1_L) | Java | 2074 ms | 24484 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |