분류 전체보기841 백준 10988 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main10988 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = br.readLine(); int len = str.length(); int mid = 0; int state = 1; if(len%2 == 0) { //짝수 이면 mid = len/2; for(int i=0 ;i=mid; j--) { i.. 2022. 1. 30. 백준 2979 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; public class Main2979 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int A = Integer.parseInt(st.nex.. 2022. 1. 29. 백준 10808 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main10808 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String S = br.readLine(); int[] alpha = new int[26]; for(int i=0; i 2022. 1. 28. 백준 2309_1 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; public class Main2309_1 { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int[] height = new int[9]; int sum = 0; for(int i=0; i 2022. 1. 27. 백준 15991 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main15991 { public static final int MOD = 1_000_000_009; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); //테스트 케이스 T long[] D = new long[100001]; //D[i] = 정수 i를 만드는 .. 2022. 1. 26. 백준 1633 import java.util.Scanner; public class Main1633 { public static void main(String[] args) { //1. 백을 선택 //2. 흑을 선택 //3. 둘다 선택하지 않음 int[][] P = new int[1001][2]; int[][][] D = new int[1001][16][16]; //D[i][j][k] = max(D[i-1][j-1][k] + P[i][0], D[i-1][j][k-1]+P[i][1], D[i-1][i][j]) int max_idx = 15; int cnt = 0; Scanner sc = new Scanner(System.in); while(sc.hasNextInt()) { P[cnt][0] = sc.nextInt(); .. 2022. 1. 25. 이전 1 ··· 77 78 79 80 81 82 83 ··· 141 다음