목록데이터 엔지니어링 정복/Algorithm (159)
지구정복
-자바 package dp; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class AntWarrior1 { private static BufferedWriter bw = new BufferedWriter( new OutputStreamWriter(System.out)); private static int n;//식량창고의 개수 private static int[] room;//식량수가 담길 식량..
-자바 package dp; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class UpStairs1 { private static BufferedWriter bw = new BufferedWriter( new OutputStreamWriter(System.out)); private static int n;//총 계단의 수 private static int[] s;//계단점수 담을 배열 private static int[] dp;//각 계단에 따른 점수 합..
-문제 https://www.acmicpc.net/problem/9095 9095번: 1, 2, 3 더하기 각 테스트 케이스마다, n을 1, 2, 3의 합으로 나타내는 방법의 수를 출력한다. www.acmicpc.net -자바 package dp; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Plus123_1 { private static BufferedWriter bw = new BufferedWriter( new OutputStreamWrit..
-자바 package dp; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Tobe1_1 { private static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); private static int x;//입력값 private static int[] arr; public static void main(String[] args) throws NumberForm..