Submission #562068

# Submission time Handle Problem Language Result Execution time Memory
562068 2022-05-14T05:09:20 Z jh05013 Lonely mdic (kriii1_L) Java 11
0 / 1
2000 ms 24744 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++; break;}
        }
    }
    sb.append(ans);

    System.out.println(sb);
}

}

Compilation message

Note: L.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
# Verdict Execution time Memory Grader output
1 Correct 816 ms 23692 KB Output is correct
2 Correct 1126 ms 21300 KB Output is correct
3 Correct 1905 ms 22708 KB Output is correct
4 Execution timed out 2066 ms 24744 KB Time limit exceeded
5 Halted 0 ms 0 KB -