diff --git "a/suyeun84/202507/13 BOJ G5 \353\221\220 \354\232\251\354\225\241.md" "b/suyeun84/202507/13 BOJ G5 \353\221\220 \354\232\251\354\225\241.md" new file mode 100644 index 00000000..692fdb34 --- /dev/null +++ "b/suyeun84/202507/13 BOJ G5 \353\221\220 \354\232\251\354\225\241.md" @@ -0,0 +1,37 @@ +```java +import java.util.*; +import java.io.*; + +public class boj2470 { + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static StringTokenizer st; + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + + public static void main(String[] args) throws Exception { + nextLine(); + int N = nextInt(); + int[] num = new int[N]; + nextLine(); + for (int i = 0; i < N; i++) num[i] = nextInt(); + Arrays.sort(num); + + int check = Integer.MAX_VALUE; + int answer1 = 0, answer2 = 0; + int low = 0, high = N-1; + + while(low