Home
MINJUN
Cancel

BOJ. Line up (2252)

[Link] https://www.acmicpc.net/problem/2252 import java.util.*; import java.io.*; public class Main { static BufferedReader br; public static void main(String[] args) throws IOException { b...

BOJ. Determine task (1311)

[Link] https://www.acmicpc.net/problem/1311 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static int n = 0; static int[][] cost; static int[][] dp; pu...

BOJ. Matrix multiplication order (11049)

[Link] https://www.acmicpc.net/problem/11049 const stream = require('fs').readFileSync(0, 'utf-8').trim().split(/\n/); const n = +stream[0], max = 987654321, arr = []; const dp = Array.from(...

BOJ. Continuative sum of prime (1644)

[Link] https://www.acmicpc.net/problem/1644 import java.util.*; import java.io.*; public class Main { static BufferedReader br; public static void main(String[] args) throws IOException { b...

BOJ. Set (11723)

[Link] https://www.acmicpc.net/problem/11723 import java.util.*; import java.io.*; public class Main { static BufferedReader br; public static void main(String[] args) throws IOException { ...

BOJ. Strongly Connected Component (2150)

[Link] https://www.acmicpc.net/problem/2150 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static int[] parent; static boolean[] handled; static int idx...

BOJ. Tree And Query (15681)

[Link] https://www.acmicpc.net/problem/15681 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static int max = 0, maxIdx = 0; public static void main(Strin...

BOJ. Make Bridge(2) (17472)

[Link] https://www.acmicpc.net/problem/17472 In function getParent, copying only value and returning parent[idx] can be confusing. parent[idx].i = getParent(arr, parent[idx]).i parent[idx].y = ge...

BOJ. Planet Tunnel (2887)

[Link] https://www.acmicpc.net/problem/2887 Let’s assume Graph T is sub-graph of MST and contains edge that connects two vertex which is not next to each other. Without Loss of Generaility let tw...

BOJ. MST (Minimum Spanning Tree) (1197)

[Link] https://www.acmicpc.net/problem/1197 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static int[] seg; static int[] orig; public static void main(...