전체 글
-
boj)11721 - 열 개씩 끊어 출력하기PS/boj 2020. 11. 5. 14:40
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 import java.io.*; public class boj_11721 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); public static void main(String[] args) throws IOException { String str = br.readLine(); int length = str.length(); while (length >= 10) { String substring = str.substring(0, 10); System.out.println(substring); str = str.sub..
-
boj)4963 - 섬의 개수PS/boj 2020. 11. 3. 14:37
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 import java.io.*; import java.util.*; public class boj_4963 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static..
-
boj)1707 - 이분그래프PS/boj 2020. 11. 3. 13:52
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 import java.io.*; import java.util.*; public class boj_1707 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static Bu..
-
boj)11724 - 연결 요소의 개수PS/boj 2020. 11. 2. 18:29
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 import java.io.*; import java.util.*; public class boj_11724 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static Queue q = new LinkedList(); static..
-
boj)5014 - 스타트링크PS/boj 2020. 11. 2. 13:36
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 import java.io.*; import java.util.*; public class boj_5014 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static Queue q = new LinkedList(); static boolean[] v;..
-
boj)2146 - 다리 만들기PS/boj 2020. 11. 2. 12:16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 import java.io.*; import java.util.*; public class..
-
boj)13023 - ABCDEPS/boj 2020. 10. 29. 15:44
import java.util.*; class Edge { int from, to; Edge(int from, int to) { this.from = from; this.to = to; } } public class boj_13023{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); // 사람의 수 int m = sc.nextInt(); // 관계의 수 boolean[][] a = new boolean[n][n]; // 인접행렬 ArrayList[] g = (ArrayList[]) new ArrayList[n]; // 인접리스트 ArrayList edges = new Arra..
-
boj)2206 - 벽 부수고 이동하기PS/boj 2020. 10. 24. 17:17
import java.io.*; import java.util.*; public class boj_2206 { static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); static StringTokenizer st; static int N, M, nx, ny; static int[][] map; static boolean[][][] v; static int[] dx = {-1, 1, 0, 0}; static int[] dy = {0, 0, -1, 1}; static Queue q = new LinkedList(); public static void main(String[] args) throws IOException ..