Problem Solving/Baekjoon1338 [백준] 27940 가지 산사태 - Greedy / Java • 문제 링크 27940번: 가지 산사태 첫째 줄에 농장의 층수 $N$, 비가 오는 횟수 $M$, 각 층이 버틸 수 있는 빗물의 양을 나타내는 정수 $K$가 주어진다. $(1 \le N \le 10^5;$ $1 \le M \le 10^6;$ $1 \le K \le 2 \times 10^9)$ 둘째 줄부터 $M$개의 줄에 걸 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 .. 2024. 2. 11. [백준] 27563 Moo Operations - Greedy / Java • 문제 링크 27563번: Moo Operations Because Bessie is bored of playing with her usual text string where the only characters are 'C,' 'O,' and 'W,' Farmer John gave her $Q$ new strings ($1 \leq Q \leq 100$), where the only characters are 'M' and 'O.' Bessie's favorite word out of the characte www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExcepti.. 2024. 2. 10. [백준] 11255 ITAI Virus - Graph Theory / Java • 문제 링크 11255번: ITAI Virus “Insane Transferable Abnormal Illness” or ITAI for short, is a new viral disease first discovered in a southern part of some city. The symptom is that persons contract with virus will continuously and uncontrollably scream “Itai, itai!” When this v www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; impo.. 2024. 2. 9. [백준] 10328 Jury Jeopardy - Graph Theory / Java • 문제 링크 10328번: Jury Jeopardy On the first line one positive number: the number of test cases, at most 100. After that per test case: one line with two space-separated integers h and w (3 ≤ h, w ≤ 100): the height and width of the maze, respectively. h lines, each with w characters www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; i.. 2024. 2. 8. [백준] 8073 Road Net - Graph Theory / Java • 문제 링크 8073번: Road Net Your program should write all the pairs of the neighbouring towns (i.e. their numbers) to the standard output. There should be one pair in each line. Each pair can appear only once. The numbers in each pair should be given in increasing order. Pairs should www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter;.. 2024. 2. 7. [백준] 17848 Flight Turbulence - Graph Theory / Java • 문제 링크 17848번: Flight Turbulence Fly-By-Night Airlines is a low budget carrier specializing in late night/early morning flights. Things are run a little looser on this airline as was apparent a few nights ago. The flight from Ypsilanti, MI to Walla Walla, WA was completely sold out and al www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStr.. 2024. 2. 6. 이전 1 ··· 112 113 114 115 116 117 118 ··· 223 다음