반응형 백준2217로프1 [Java][그리디 알고리즘] 백준 2217 로프 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); int[] rope = new int[n]; int[] ans = new int[n]; for(int i=0; i 2021. 5. 2. 이전 1 다음 반응형