본문 바로가기

Problem Solving/Baekjoon1337

[백준] 10774 저지 - Greedy / Java • 문제 링크 10774번: 저지 학교 대표팀은 1부터 번호가 매겨진 저지를 학생 선수들에게 배분하고자 한다. 저지의 사이즈는 S, M, L 중 하나이다 (물론 S=small, M=medium, L=Large다). 각각의 선수들은 구체적인 저지의 번호와 선호 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 OutputStream.. 2024. 1. 11.
[백준] 5991 Papaya Jungle - Graph Theory / Java • 문제 링크 5991번: Papaya Jungle Bessie has wandered off the farm into the adjoining farmer's land. He raises delicious papaya fruit, which is a delicacy for cows. The papaya jungle is partitioned into a grid of squares with R rows and C columns (1 2024. 1. 10.
[백준] 26999 Satellite Photographs - Graph Theory / Java • 문제 링크 26999번: Satellite Photographs Farmer John purchased satellite photos of W x H pixels of his farm (1 ≤ W ≤ 80, 1 ≤ H ≤ 1000) and wishes to determine the largest 'contiguous' (connected) pasture. Pastures are contiguous when any pair of pixels in a pasture can be connected by tra www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExceptio.. 2024. 1. 9.
[백준] 6018 Tea Time - Graph Theory / Java • 문제 링크 6018번: Tea Time N (1 2024. 1. 8.
[백준] 6188 Clear Cold Water - Graph Theory / Java • 문제 링크 6188번: Clear Cold Water The steamy, sweltering summers of Wisconsin's dairy district stimulate the cows to slake their thirst. Farmer John pipes clear cold water into a set of N (3 2024. 1. 7.
[백준] 9255 The Friend of My Enemy is My Enemy - Graph Theory / Java • 문제 링크 9255번: The Friend of My Enemy is My Enemy For each data set, output “Data Set x:” on a line by itself, where x is its number. Then, output on one line all the direct friends of person s in the network, sorted in increasing order, separated by a space. (No person is friends with himself/herself www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java... 2024. 1. 6.