import java.util.Arrays; import java.util.Scanner; public class Main { public static boolean visited[]; public static int array[]; public static int sumTime() { int sum = 0; for(int i = 0; i < visited.length; i++) { if(visited[i]) { sum += array[i]; } } return sum; } public static void main(String[] args) { Scanner scan = new Scanner(System.in); int sum = 0; int N = scan.nextInt(); visited = new..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; class Dot{ int x; int y; int count; public Dot(int x, int y) { this.x = x; this.y = y; } public Dot(int x, int y, int count) { this.x = x; this.y = y; this.count = count; } } public class Main { static int map[][]; // 2차원 미로 배열 static boolean visit[][]; // 2차원 방문여부 배열 static int N; st..
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.*; class Dot{ int x; int y; public Dot(int x, int y) { this.x = x; this.y = y; } } public class Main { static int map[][]; // 2차원 미로 배열 static boolean visit[][]; // 2차원 방문여부 배열 static ArrayList list; static int n; static int[] dx = {-1,0,1,0}; static int[] dy = {0,1,0,-1}; public static ..