본문 바로가기

[백준] 2638 : 치즈 -JAVA(자바) - 사좋배 공유 import java.util.LinkedList; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main_치즈2 { static int arr[][]; static int x; static int y; static int result; static int visit[][]; static int dx[]= {-1,0,1,0}; static int dy[] = {0,1,0,-1}; static Queue q; public static void main(String[] args) { Scanner sc = new Scanner(System.in); x= sc.nextInt(); y= sc.n..
[백준] 2636 : 치즈 -JAVA(자바) - 사좋배 공유 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int x; static int y; static int arr[][]; static int visit[][]; static Queueq; static int result; static int dx[]= {-1,0,1,0}; static int dy[] = {0,1,0,-1}; public static void main(String[] args) { Scanner sc = new Scanner(System.in); x= sc.nextInt(); y= sc.nextInt(); arr= new int[x][y]; visi..
[백준] 1261 : 알고스팟 -JAVA - 사좋배 공유 import java.util.LinkedList; import java.util.PriorityQueue; import java.util.Scanner; public class Main { static int garo; static int sero; static int arr[][]; static PriorityQueuepq; static int result; static int realdepth; static int dx[] = {-1,0,1,0}; static int dy[] = {0,1,0,-1}; static int visit[][]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); garo = sc.ne..
[백준] 5014 : 스타트링크 - JAVA(자바) - 사좋배 공유 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int Fsize; static int Start; static int Ges; static int Up; static int Down; static int result; static int arr[]; static Queue q; static int dx[]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); Fsize = sc.nextInt(); Start = sc.nextInt(); Ges = sc.nextInt(); Up ..
[백준] 1600 : 말이 되고픈 원숭이 -JAVA(자바) - 사좋배 공유 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main_말이되고픈원숭이 { static int[][]arr; static int K; static int garo; static int sero; static Queue q; static int dx[]= {-1,0,1,0,-2,-1,1,2,2,1,-1,-2}; static int dy[] = {0,1,0,-1,1,2,2,1,-1,-2,-2,-1}; static boolean visit[][][]; static int result; public static void main(String[] args) { Scanner sc = new Sca..
[백준] 2589 : 보물섬 -JAVA(자바) - 사좋배 공유 import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { //4방 탐색중에 1곳만 되는곳. //보물섬 static int dx[]= {1,0,-1,0}; static int dy[]= {0,1,0,-1}; static char[][] arr; static Queueq; static int sizex; static int sizey; static int result; public static void main(String[] args) { Scanner sc= new Scanner(System.in); sizex= sc.nextInt(); si..
[백준] 2583 : 영역 구하기 -JAVA(자바) - 사좋배 공유 import java.util.Arrays; import java.util.Scanner; public class Main { static int arr[][]; static boolean visit[][]; static int sizex; static int sizey; static int area_count; static int count; static int dy[] = {0,-1,0,1,0}; static int dx[] = {0,0,1,0,-1}; static int ct[]; public static void main(String[] args) { Scanner sc= new Scanner(System.in); sizey=sc.nextInt(); sizex=sc.nextInt(); area_c..
[백준] 7562 : 나이트의 이동 -JAVA(자바) - 사좋배 공유 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int dx[]= {-2,-1,1,2,2,1,-1,-2}; static int dy[]= {1,2,2,1,-1,-2,-2,-1}; static int [][]arr; static boolean [][]visit; static int chase_size; static Queueq; static int result; public static void main(String[] args) { Scanner sc= new Scanner(System.in); int test_case=Integer.parseInt(sc.nextL..