전체 글24 Union-Find import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Comparator; import java.util.PriorityQueue; import java.util.StringTokenizer; class Edge implements Comparable, Comparator { int s; int e; int w; Edge(int s, int .. 2018. 7. 17. 위상정렬 (Topological Sort) package boj; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; public class TopologicalSort { /* * BOJ 1516 게임 개발 * https://www.acmicpc.net/pr.. 2018. 7. 17. SPFA (Shortest Path Faster Algorithm) import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; import java.util.StringTokenizer; class Farm { int s; int e; int t; Farm (int s, int e, int t){ this... 2018. 7. 17. 인덱스 트리 (Indexed Tree) import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class Main { /* * 구간 합 구하기 * https://www.acmicpc.net/problem/2042 */ public static void main(String[] args) throws IOException {.. 2018. 7. 17. 이전 1 2 3 4 5 6 다음