[백준] 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..
[백준] 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..