알고리즘148 [JAVA]백준_3019_빵집 문제링크 https://www.acmicpc.net/problem/3109 3109번: 빵집 유명한 제빵사 김원웅은 빵집을 운영하고 있다. 원웅이의 빵집은 글로벌 재정 위기를 피해가지 못했고, 결국 심각한 재정 위기에 빠졌다. 원웅이는 지출을 줄이고자 여기저기 지출을 살펴보던 www.acmicpc.net import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { static int R,C, cnt = 0; static char[][] map; static boolean[][] visited; public.. 2021. 2. 18. [JAVA]백준_1992_쿼드트리 문제링크 https://www.acmicpc.net/problem/1992 import java.util.Arrays; import java.util.Scanner; public class Main_1992 { static int map[][]; static int N; static int res; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); map = new int[N][N]; for(int i=0;i 2021. 2. 18. [JAVA]백준_15686_치킨배달 문제링크 https://www.acmicpc.net/problem/15686 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.StringTokenizer; public class Main { static int N,M; static int totalDistance = Integer.MAX_VALUE; static int map[][]; static int isSelected[]; static ArrayList list = new ArrayList(); static .. 2021. 2. 17. [JAVA]백준_2567_색종이2 문제링크 https://www.acmicpc.net/problem/2567 import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); int map[][] = new int[101][101]; boolean isVisited[][] = new boolean[101][101]; for(int t=0;t 2021. 2. 17. [JAVA]SWExpert_1493_새로운 수의 연산 문제링크 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV2b-QGqADMBBASw import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Solution { static Queue queue; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for(int t=0;t 2021. 2. 17. [JAVA]백준_1931_회의실 배정 문제링크 https://www.acmicpc.net/problem/1931 import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); //회의의 최대 개수 Meeting m[] = new Meeting[N]; for(int i=0;i 2021. 2. 17. [JAVA]백준_2961_도영이가 만든 맛있는 음식 문제링크 https://www.acmicpc.net/problem/2961 import java.util.ArrayList; import java.util.Scanner; public class Main_2961 { static int N; static int S,B; //신맛 쓴맛 static int sSum,bSum; static int min = Integer.MAX_VALUE; static ArrayList list = new ArrayList(); public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); for(int i=0;i 2021. 2. 16. [JAVA]백준_10972_다음순열 문제링크 https://www.acmicpc.net/problem/10972 import java.util.Scanner; public class Main_10972 { static int N; static int numbers[]; public static void main(String[] args){ Scanner sc = new Scanner(System.in); N = sc.nextInt(); numbers = new int[N]; for(int i=0;i=numbers[i]) --i; if(i ==0) return false; int j = N-1; while(numbers[i-1]>=numbers[j]) --j; //꺽이는 값 찾은 후 제일 큰 값 찾기 swap(i-1,j); int k = N.. 2021. 2. 16. [JAVA]백준_10026_적록색약 문제링크 https://www.acmicpc.net/problem/10026 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class Main_10026 { static char grid[][]; static boolean isVisited[][]; static int zone,colorZone; static int dx[] = {0,0,-1,1}; //상하 static int dy[] = {-1,1,0,0}; //좌우 .. 2021. 2. 15. 이전 1 ··· 10 11 12 13 14 15 16 17 다음