백준

· Dev/PS
import java.io.*; import java.util.*; class Floor { int num; int cnt; Floor(int num, int cnt) { this.num = num; this.cnt = cnt; } } public class StartLink { static BufferedReader br; static StringTokenizer st; static int f, s, g, u, d; static Floor ans; static boolean[] checked; public static void main(String[] args) throws IOException{ input(); bfs(); if(ans == null) System.out.println("use the..
· Dev/PS
import java.io.*; import java.util.*; class Rect { int x1; int y1; int x2; int y2; Rect(int x1, int y1, int x2, int y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } } public class Logo { static BufferedReader br; static StringTokenizer st; static int n; static int ans; static boolean[] checked; static Rect[] rectArr; static Queue q; public static void main(String[] args) throws IO..
· Dev/PS
import java.io.*; import java.util.*; public class MakingPassword { static BufferedReader br; static StringTokenizer st; static int l, c; static char[] arr; static StringBuilder sb; static Set gather; static boolean[] checked; public static void main(String[] args) throws IOException { input(); dfs(0, 0, ""); System.out.print(sb); } static void input() throws IOException{ br = new BufferedReader..
· Dev/PS
import java.io.*; import java.util.*; public class CharBoard { static BufferedReader br; static StringTokenizer st; static int[] dx = {-1, 1, 0, 0}; static int[] dy = {0, 0, -1, 1}; static char[] ansWord; static char[][] board; static int[][][] dp; static int n, m, k; static int ans; public static void main(String[] args) throws IOException{ input(); for(int i = 0; i < n; i++) { for(int j = 0; j..
· Dev/PS
import java.io.*; import java.util.*; public class Bottle { static BufferedReader br; static StringTokenizer st; static StringBuilder sb = new StringBuilder(); static List ans; static int[] cur = new int[3]; static int[] capacity = new int[3]; static HashSet set; public static void main(String[] args) throws IOException{ input(); int[] arr = cur.clone(); dfs(arr); Collections.sort(ans); for(int ..
· Dev/PS
import java.io.*; import java.util.*; public class Puzzle { static BufferedReader br; static StringTokenizer st; static final int[] dx = {-1, 1, 0, 0}; static final int[] dy = {0, 0, -1, 1}; static String input = ""; static final String ans = "123456780"; static HashMap map = new HashMap(); public static void main(String[] args) throws IOException { input(); solve(); } static void input() throws..
· Dev/PS
import java.io.*; import java.util.*; class Node { int num; int cnt; Node(int num, int cnt) { this.num = num; this.cnt = cnt; } } public class HideAndSeek { static BufferedReader br; static StringTokenizer st; static int N, K; static int ans; static boolean[] checked; public static void main(String[] args) throws IOException{ input(); solve(); System.out.println(ans); } public static void input(..
· Dev/PS
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class TSP { static BufferedReader br; static StringTokenizer st; static int N; static int[][] W; static int ans = Integer.MAX_VALUE; public static void main(String[] args) throws IOException{ input(); solve(); System.out.println(ans); } public static void input() ..
· Dev/PS
import java.io.*; import java.util.*; public class DivisionSquare { static BufferedReader br; static StringTokenizer st; static int N, M; static int[][] arr; static long[][] sum; static long ans = -1; public static void main(String[] args) throws IOException{ input(); solve(); System.out.println(ans); } public static void input() throws IOException { br = new BufferedReader(new InputStreamReader..
· Dev/PS
import java.io.*; import java.util.StringTokenizer; public class RemoteController { static BufferedReader br; static StringTokenizer st; static String N; static int cnt; static String[] buttons; static int ans = 0; public static void main(String[] args) throws IOException{ input(); solve(); System.out.println(ans); } public static void input() throws IOException { br = new BufferedReader(new Inp..
풋데브
'백준' 태그의 글 목록 (6 Page)