Home
MINJUN
Cancel

BOJ. Exercise (1956)

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

BOJ. KCM Travel (10217)

[Link] https://www.acmicpc.net/problem/10217 //optimation line74-77 dp[destination][cost] import java.util.*; import java.io.*; public class Main { static BufferedReader br; public static v...

BOJ. Floyd (11404)

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

LeetCode. 997. Find the Town Judge

[Link] https://leetcode.com/problems/find-the-town-judge/ class Solution { public int findJudge(int n, int[][] trust) { if(n == 1) return trust.length == 0 ? 1 : -1; int[] ...

BOJ. Time Machine (11657)

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

BOJ. Unidentified destination (9370)

[Link] https://www.acmicpc.net/problem/9370 //Edge case s == (g or h) or (g or h) == destination import java.util.*; import java.io.*; public class Main { public static void main(String[] args...

LeetCode. 312. Burst Balloons

[Link] https://leetcode.com/problems/burst-balloons/ Bottom-Up(Fast) class Solution { public int maxCoins(int[] nums) { int n = nums.length; int[] ball = new int[n + 2]; ...

BOJ. Shortest path with specification (1504)

[Link] https://www.acmicpc.net/problem/1504 //Edge Case: Vertext that must to be included could be start or end point(line 71) import java.util.*; import java.io.*; public class Main { static ...

BOJ. Prefix Product (11505)

[Link] https://www.acmicpc.net/problem/11505 import java.util.*; import java.io.*; public class Main { static int NUM = 1000000007; public static void main(String[] args) throws IOException {...

BOJ. Shortest Path (1753)

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