[Link] https://AtCoder.jp/contests/arc135/tasks/arc135_b IDEA) First three element import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder s...
AtCoder. Regular Contest 135 A Floor, Ceil Decomposition
[Link] https://AtCoder.jp/contests/arc135/tasks/arc135_a import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); sta...
Codeforces Global Round 19 B. MEX and Array
[Link] https://codeforces.com/contest/1637/problem/B import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); public...
BOJ. Idol (3648)
[Link] https://www.acmicpc.net/problem/3648 In order for Karl to go to the next round Method 1 Tarjan is DFS SCC => { x, -x } included in same scc || if(parent[1] > parent[-1]) => can...
Codeforces Global Round 19 C. Andrew and Stones
[Link] https://codeforces.com/contest/1637/problem/C import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); public...
Codeforces Global Round 19 A. Sorting Parts
[Link] https://codeforces.com/contest/1637/problem/A import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); public...
LeetCode. 100. Same Tree
[Link] https://leetcode.com/problems/same-tree/ /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNod...
BOJ. 2-SAT - 3 (11280)
[Link] https://www.acmicpc.net/problem/11280 IDEA (N U M) = true <=> (!N => M) || (M => !N) [ 1~n, -1 ~ -n ] => SCC => (a => b => c … => (-a)) => can’t be solved(W...
BOJ. Domino (4196)
[Link] https://www.acmicpc.net/problem/4196 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); static int sccI...
BOJ. Soccer Tactics (3977)
[Link] https://www.acmicpc.net/problem/3977 import java.util.*; import java.io.*; public class Main { static BufferedReader br; static StringBuilder sb = new StringBuilder(); static int sccI...