From 05d0f9adeac7c3c0639ba6d79bbfef7dfc498a53 Mon Sep 17 00:00:00 2001 From: sukangpunch Date: Fri, 30 Jan 2026 20:47:19 +0900 Subject: [PATCH] =?UTF-8?q?[Week04]=20BOJ=5F4386:=20=EB=B3=84=EC=9E=90?= =?UTF-8?q?=EB=A6=AC=20=EB=A7=8C=EB=93=A4=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sukangpunch.java" | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 "weekly/week04/BOJ_4386_\353\263\204\354\236\220\353\246\254\353\247\214\353\223\244\352\270\260/sukangpunch.java" diff --git "a/weekly/week04/BOJ_4386_\353\263\204\354\236\220\353\246\254\353\247\214\353\223\244\352\270\260/sukangpunch.java" "b/weekly/week04/BOJ_4386_\353\263\204\354\236\220\353\246\254\353\247\214\353\223\244\352\270\260/sukangpunch.java" new file mode 100644 index 0000000..5ca60a2 --- /dev/null +++ "b/weekly/week04/BOJ_4386_\353\263\204\354\236\220\353\246\254\353\247\214\353\223\244\352\270\260/sukangpunch.java" @@ -0,0 +1,104 @@ +package study.week04; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.PriorityQueue; + +// 별자리 만들기 +public class BOJ_4386 { + + static class Point{ + int num; + double x; + double y; + + public Point(int num, double x,double y){ + this.num = num; + this.x = x; + this.y = y; + } + } + + static class Edge{ + int start; + int end; + double weight; + + public Edge(int start, int end, double weight){ + this.start = start; + this.end = end; + this.weight = weight; + } + } + + static int[] parent; + static PriorityQueue pq; + + public static void main(String[] args) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + + int N = Integer.parseInt(br.readLine()); + Point [] points = new Point[N]; + + for(int i=0; i((e1, e2) -> { + if(e1.weight < e2.weight) return -1; + return 1; + }); + + for (int i=0; i