본문 바로가기

Java426

[백준/Java] 2573번 빙산 -Codeimport java.io.*;import java.util.*;public class BOJ2573 { static class Pos { int row, col; public Pos (int row, int col) { this.row = row; this.col = col; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Pos pos = (.. 2026. 1. 24.
[백준/Java] 13913번 숨바꼭질 4 -Codeimport java.io.*;import java.util.*;public class BOJ13913 { static class Info { int pos, time; public Info(int pos, int time) { this.pos = pos; this.time = time; } } static Integer[] parents = new Integer[100001]; static { Arrays.fill(parents, null); } public static void main(String[] args) throws Exception { Buffere.. 2026. 1. 24.
[백준/Java] 7798번 Hotel -Codeimport java.io.*;import java.util.*;public class BOJ7798 { static class HotelInfo { int bedSize, capacity, rooms, price; String name; public HotelInfo(int bedSize, int capacity, int rooms, int price, String name) { this.bedSize = bedSize; this.capacity = capacity; this.rooms = rooms; this.price = price; this.name.. 2026. 1. 24.
[백준/Java] 6593번 상범 빌딩 -Codeimport java.io.*;import java.util.*;public class BOJ6593 { static class Pos { int height, row, col, time; public Pos (int height, int row, int col, int time) { this.height = height; this.row = row; this.col = col; this.time = time; } } static int heightSize; static int rowSize; static int colSize; static char.. 2026. 1. 24.
[백준/Java] 4179번 불! -Codeimport java.io.*;import java.util.*;public class BOJ4179 { static class PosInfo { int row, col; boolean isFire; public PosInfo(int row, int col, boolean isFire) { this.row = row; this.col = col; this.isFire = isFire; } } static int rowSize; static int colSize; static boolean[][] visited; static char[][] miro; .. 2026. 1. 23.
[백준/Java] 14503번 로봇 청소기 -Codeimport java.io.*;import java.util.*;public class BOJ14503 { static int[] dRow = {-1, 0, 1, 0}; static int[] dCol = {0, 1, 0, -1}; 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(st.n.. 2026. 1. 23.