BAEKJOON
-
[BOJ] [JAVA] [GOLD 4] 17298: 오큰수BAEKJOON/자료 구조(Data Structure) 2024. 8. 2. 16:33
https://www.acmicpc.net/problem/17298import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { static int N, A[]; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); N = Integer.parseInt(br.readLine()); // 크기 A = new i..
-
[BOJ] [JAVA] [GOLD 3] 2623: 음악프로그램BAEKJOON/그래프(Graph) 이론 2024. 7. 5. 13:05
https://www.acmicpc.net/problem/2623import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.ArrayDeque;import java.util.ArrayList;import java.util.Queue;import java.util.StringTokenizer;public class Main { static int N, M; static Node adjList[]; static int inDegree[]; static class Node { int vertex; Node link; public Node (int vertex, Node..
-
[BOJ] [JAVA] [GOLD 3] 2252: 줄 세우기BAEKJOON/그래프(Graph) 이론 2024. 7. 3. 15:36
https://www.acmicpc.net/problem/2252import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class BOJ2252 { static class Node { int vertex; Node link; public Node (int vertex, Node link) { this.vertex = vertex; this.link = link; } } static int N, M; static Node adjList[]; ..
-
[BOJ] [JAVA] [GOLD 4] 17060 : 파이프 옮기기 2BAEKJOON/동적 계획법(Dynamic Programming) 2024. 6. 25. 14:41
https://www.acmicpc.net/problem/17069import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.StringTokenizer;public class Main { static int N, arr[][]; static long dp[][][]; public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.r..