목록숨바꼭질 (1)
hara
BEAKJOON JAVA ALGORITHM #1697(숨바꼭질)
https://www.acmicpc.net/problem/1697 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class a1697 { public static final int max = 100000; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int s = sc.nextInt(); int y = sc.nextInt(); boolean[] check = new boolean[max+1]; int[] dist = new int[max+1]; check[s] = true; dist[s] = 0; Queu..
공부/알고리즘
2017. 8. 9. 22:45