Algorithm/Beakjoon

·Algorithm/Beakjoon
https://www.acmicpc.net/problem/17951import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(s..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/17281 import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;public class Main { static int N, maxScore = 0; //이닝 수, 픽스된 선수 숫자 static int[] seq = new int[9];//선발 순서 static boolean[] checked = new boolean[9], base = new boolean[4]; //사용된 선수 static int[][] pResult; public static void main(String[] args) throws Exception{ BufferedRead..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/17135import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.HashSet;import java.util.List;import java.util.PriorityQueue;import java.util.Set;import java.util.StringTokenizer;public class Main { static int[][] map; static int N, M, D, maxKill = 0; static List enemies = new ArrayList(); static int ivy = 0; public..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/1106import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class Main { public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int C = I..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/9084import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class Main { static int[] coins, dp; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int T = Integer.parseInt(br.readLine()); ..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/14567import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.*;public class Main_14567 { static int N, M; static int[] dp; static ArrayList[] prerequisite; public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new Stri..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/3649import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;public class Main { static String input = null; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); while ((input = br.readLine(..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/20436import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.HashMap;import java.util.Map;import java.util.StringTokenizer;public class Main_20436 { static Map lefts, rights; static int totalTime = 0, distance; static Pos sL, sR; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedRea..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/14499import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.HashMap;import java.util.Map;import java.util.StringTokenizer;public class Main_14499 { static int[] nextBase = {0, 3, 4, 2, 5}; //시작 위치 윗면 1, 동쪽 3 기준 static int[][] map; static int[][] roll = {{0, 0},{0, 1}, {0, -1}, {-1, 0}, {1, 0}}; //동서북남 static Map diceNum = new H..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/12100import java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;import java.util.LinkedList;import java.util.Queue;public class Main_12100 { static int N, maxBlock = 0; //위 0 왼쪽 1 아래 2 오른쪽 3 public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in));..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/11404 11404번: 플로이드첫째 줄에 도시의 개수 n이 주어지고 둘째 줄에는 버스의 개수 m이 주어진다. 그리고 셋째 줄부터 m+2줄까지 다음과 같은 버스의 정보가 주어진다. 먼저 처음에는 그 버스의 출발 도시의 번호가www.acmicpc.netimport java.io.BufferedReader;import java.io.InputStreamReader;import java.util.Arrays;import java.util.StringTokenizer;public class Main { final static int INF = 100000001; static int start, end, cost; static StringT..
·Algorithm/Beakjoon
https://www.acmicpc.net/problem/12015 12015번: 가장 긴 증가하는 부분 수열 2 첫째 줄에 수열 A의 크기 N (1 ≤ N ≤ 1,000,000)이 주어진다. 둘째 줄에는 수열 A를 이루고 있는 Ai가 주어진다. (1 ≤ Ai ≤ 1,000,000) www.acmicpc.net import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) throws Exception { Buff..
mopipi
'Algorithm/Beakjoon' 카테고리의 글 목록