목록공부/알고리즘 (52)
hara
https://www.acmicpc.net/problem/11054 import java.util.Scanner; public class a11054 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr1 = new int[num]; int[] arr2 = new int[num]; int k = num-1; for(int i=0; i
https://www.acmicpc.net/problem/11722 import java.util.Scanner; public class a11722 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num]; for(int i=num-1; i>=0; i--) { arr[i] = sc.nextInt(); } int[] d = new int[num]; for(int i=0; i
https://www.acmicpc.net/problem/11055 import java.util.Scanner; public class a11055 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num]; for(int i=0; i
https://www.acmicpc.net/problem/11053 import java.util.Scanner; public class a11053 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num]; for(int i=0; i
https://www.acmicpc.net/problem/2156 import java.util.Scanner; public class a2156 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num+1]; for(int i=1; i= 2) { d[2] = arr[1] + arr[2]; } for(int i=3; i