본문 바로가기

Problem Solving1241

[백준] 21313 문어 - Greedy / Java • 문제 링크 21313번: 문어 문어에게 여덟개의 팔이 있다는 사실은 잘 알려져 있다. 하지만 문어들이 자신의 팔들을 1번, 2번, 3번, ..., 8번이라고 부른다는 말은 오늘 처음 들었을 것이다! 단, 시계방향으로 오름차순이라던 www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System... 2023. 11. 19.
[백준] 6125 Treasure Cave - Graph Theory / Java • 문제 링크 6125번: Treasure Cave Bessie's grandfather was a pirate who accumulated a great treasure chest of golden plunder. He hid the treasure chest in a cave that Bessie has recently discovered right on Farmer John's land! Just inside the cave's entrance she found a map that told her h www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWr.. 2023. 11. 17.
[백준] 11322 Numbers are Easy - Graph Theory / Java • 문제 링크 11322번: Numbers are Easy For each test case, output the smallest positive number X such that X is divisible by N and it contains only digits ’0’ and ’1’. Given the constraints, it is guaranteed that there always is a solution (for any positive N) and, in this problem, it w www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter.. 2023. 11. 16.
[백준] 11448 Ga - Graph Theory / Java • 문제 링크 11448번: Ga The Dutch version of the game “Go” is called “Ga”. It is played on an N × N board; the N2 squares are initially empty. Two players, White and Black, take turns; White begins. During a move, the player places one or more stones of his own colour (o www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.In.. 2023. 11. 15.
[백준] 6004 The Chivalrous Cow - Graph Theory / Java • 문제 링크 6004번: The Chivalrous Cow Farmer John traded one of his cows for a cow that Farmer Don called 'The Knight'. This cow has the unique ability to jump around the pasture in moves that looked like a knight on a chessboard (two squares over, one up... or maybe two squares down and one o www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExce.. 2023. 11. 14.
[백준] 26876 New Time - Graph Theory / Java • 문제 링크 26876번: New Time Nikolay has a digital clock that displays time in 24-hour format, showing two integers: hours (from $00$ to $23$) and minutes (from $00$ to $59$). For example, the clock can show 00:00, 18:42, or 23:59. The clock has two buttons that can be used for manual www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; im.. 2023. 11. 13.