| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 코딩테스트
- Java
- 러닝일지
- BFS
- binary search
- 문제해결
- 프로그래머스
- priorityqueue
- 문제풀이
- math
- 코테
- DP
- 시뮬레이션
- 이분탐색
- 알고리즘
- SQL
- 운동기록
- greedy
- db
- 자바
- MySQL
- oracle
- 투포인터
- dfs
- 백준
- SWEA
- 문자열
- COS PRO
- 건강
- BOJ
- Today
- Total
목록BFS (15)
슈콩
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/1844 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { static int[] dr = {-1,1,0,0}; static int[] dc = {0,0,-1,1}; public int solution(int[][] maps) { int answer = -1; int n = maps.length; int m = maps[0].length; boolean[][] ..
[문제]https://www.acmicpc.net/problem/9205 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n; static int[][] stores; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; int t = Integer.parseInt(br.readLine()); while(t-->0) { n = Integer.parseInt(br.readLine()); s..
[문제]https://www.acmicpc.net/problem/2573 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,m; static int[][] map; static int[] dr = {-1,1,0,0}; static int[] dc = {0,0,-1,1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); n =..
[문제]https://www.acmicpc.net/problem/2468 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,result = 0; static int[][] map; static int[] dr = {-1,1,0,0}; static int[] dc = {0,0,-1,1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; n = Integer.parseInt(br.readLin..
[문제]https://www.acmicpc.net/problem/5014 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int f = Integer.parseInt(st.nextToken()); int s = Integer.parseInt(st.nextToken()); int g = Integ..
[문제]https://www.acmicpc.net/problem/1697 [소스 코드]import java.io.*;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); int k = Integer.parseInt(st.nextToken()); int[] hide = ..
[문제]https://www.acmicpc.net/problem/7569 [소스 코드]import java.io.*;import java.util.*;public class Main { static int m,n,h,result = 0; static int[][][] tomato; static int[] dh = {1,-1,0,0,0,0}; static int[] dr = {0,0,-1,1,0,0}; static int[] dc = {0,0,0,0,-1,1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); S..
[문제]https://www.acmicpc.net/problem/2644 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n; static List[] edge; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; n = Integer.parseInt(br.readLine()); st = new StringTokenizer(br.readLine()); int a = Integer.parseI..
[문제]https://www.acmicpc.net/problem/2667 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n; static int[][] map; static boolean[][] visit; static int[] dr = {-1,1,0,0}; static int[] dc = {0,0,-1,1}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = Integer.parseInt(br.readLine()); ..
[문제]https://www.acmicpc.net/problem/2606 [소스 코드]import java.io.*;import java.util.*;public class Main { static int n,result = 0; static boolean[][] edge; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st; n = Integer.parseInt(br.readLine()); edge = new boolean[n+1][n+1]; int m = Integer.p..