코딩테스트/[백준] 코딩테스트 연습
![컨베이어 벨트 위의 로봇 - 20055번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FQ7GCw%2FbtrB5K75Xb0%2FNPAtMXJmHlKswtQabFKarK%2Fimg.png)
컨베이어 벨트 위의 로봇 - 20055번
package com.company; import java.io.*; import java.util.*; public class Main { static int stage, count, N, K, size; static int[][] arr; static ArrayList robots = new ArrayList(); public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); N = Integer.parseInt(st.next..
![도노미노도미노 2 - 20061번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fm2zqy%2FbtrBFIo4yWm%2FRDbERMeE6C9GnFM1KmCMJ0%2Fimg.png)
도노미노도미노 2 - 20061번
package com.company; import java.io.*; import java.util.*; public class Main { static int count; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = null; count = 0; ArrayList[] blue = new ArrayList[4]; ArrayList[] green = new ArrayList[4]; for (int i = 0; i < 4; i++) { blue[i] = new ArrayList(..
![주사위 윷놀이 - 17825번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fd852hs%2FbtrBibNemSG%2FnVdan5gfsbgUCZdkEa5vz1%2Fimg.png)
주사위 윷놀이 - 17825번
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] blue = {{10, 13, 16, 19, 25, 30, 35, 40}, {20, 22, 24, 25, 30, 35, 40}, {30, 28, 27, 26, 25, 30, 35, 40}}; static boolean[] check, checkBlue; static int[][] horse; static int[] move = new int[10]; static int answer = 0; public static void main(String[] args) throws IOException { BufferedReader br = new ..
![원판돌리기 - 17822번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F3lb3A%2FbtrA9h0kMm9%2F2aFpIRuKtWYqj3aTX0jKZ1%2Fimg.png)
원판돌리기 - 17822번
package com.company; import java.io.*; import java.util.*; public class Main { static ArrayList[] list; static int N, M, T; static int[][] d = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); N = Integer.parseInt(st.next..
![새로운 게임 2](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FcYWe3k%2FbtrA5sVe6ic%2FQbZc9QY3jQWlXhBlWKb8k0%2Fimg.png)
새로운 게임 2
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{0, 1}, {0, -1}, {-1, 0}, {1, 0}}; static int[][] horse, arr; static int N, K, answer; static boolean check; static ArrayList[][] list; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new Stri..
![게리맨더링 2 - 17779번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FblaIOP%2FbtrAzuMJMGo%2FVCKwA2fiW8BteWcKGNJCIK%2Fimg.png)
게리맨더링 2 - 17779번
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] arr, check, startPoint; static boolean[][] visited; static int[][] d = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; static int N, answer; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = null; answer = Integ..
![연구소 3 -17142번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FmpGqG%2FbtrAqIDB780%2FIX0HvUst8kNI0JKdkret10%2Fimg.png)
연구소 3 -17142번
package com.company; import java.io.*; import java.util.*; public class Main { static ArrayList virus; static int[][] arr; static int[][] d = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}}; static int N, M, count, answer; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()..
![미세먼지 안녕! - 17144번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2F036ih%2FbtrzLxQ9tdG%2F3bN0g4mruRZ6KdEcO3h2f1%2Fimg.png)
미세먼지 안녕! - 17144번
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}}; // 시계방향 static int[][] arr; static int R, C, T, refresh, answer; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); R = Inte..
![나무 재테크 - 16235번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fuepnw%2FbtrzLxIU0eW%2FVvbUZewHS2awhjBxUx5uN0%2Fimg.png)
나무 재테크 - 16235번
package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{-1, -1}, {-1, 0}, {-1, 1}, {0, -1}, {0, 1}, {1, -1}, {1, 0}, {1, 1}}; static int[][] arr, winter; static int N, M, K; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.re..
![빚 - 10427번](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FoHR8z%2Fbtrzvz9XoWL%2FSOZa07MvyroskL441o5rX1%2Fimg.png)
빚 - 10427번
package com.company; import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = null; StringBuilder sb = new StringBuilder(); int T = Integer.parseInt(br.readLine()); for (int t = 0; t < T; t++) { st = new StringTokenizer(br.readLine()); int N = ..