본문 바로가기
반응형

백준알고리즘35

[Java][정렬] 백준 1026 보물 import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.Comparator; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine());.. 2021. 4. 27.
백준 1717 집합의 표현 Union-Find JAVA import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class BJ_1717_2 { static int parent[]; static BufferedWriter bww; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)).. 2020. 7. 10.
백준 1976 여행 가자 JAVA Union-Find import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class BJ_1976 { public static void main(String[] args) throws NumberFormatException, IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st ; int N = Integer.parseInt(br.readLine()); int M = Integer.parseInt(br.r.. 2020. 7. 8.
백준 숫자판 점프 2210 JAVA DFS import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; import java.util.StringTokenizer; public class BJ_2210 { static int dx[] = {1,-1,0,0}; static int dy[] = {0,0,1,-1}; static int map[][]; static HashSet list ; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader.. 2020. 7. 7.
반응형