Problem Solving/Baekjoon1334 [백준] 3213 피자 - Greedy / Java • 문제 링크 3213번: 피자 첫째 줄에 친구의 수 N이 주어진다. (1 ≤ N ≤ 10,000) 다음 N개 줄에는 각 친구가 먹을 수 있는 피자의 양이 주어진다. 이 값은 항상 분수이며, 1/4, 1/2, 3/4중 하나이다. www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class Main { public static void main(String[] args) throws IOException {.. 2023. 7. 12. [백준] 20937 떡국 - Greedy / Java • 문제 링크 20937번: 떡국 Naver D2를 아시나요? D2는 For Developers, By Developers의 약자로, 개발자들을 위해 개발자들이 직접 만들어 가고 있는 네이버 개발자 지원 프로그램입니다. 네이버가 축적한 기술과 지식을 공유하고, 외 www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.Collections; import java.util.HashMap; imp.. 2023. 7. 11. [백준] 17451 평행 우주 - Greedy / Java • 문제 링크 17451번: 평행 우주 행성 1에 가기 위해 필요한 것보다 세 배의 속도로, 행성 2의 경우 두 배의 속도로 이동하면, 지구에서는 900의 속도만 쌓으면 된다. www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOExcept.. 2023. 7. 10. [백준] 20363 당근 키우기 - Greedy / Java • 문제 링크 20363번: 당근 키우기 첫째 줄에 X와 Y (0 ≤ X, Y ≤ 109)를 의미하는 정수가 공백으로 구분되어 주어진다. www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader b.. 2023. 7. 9. [백준] 6031 Feeding Time - Graph Theory / Java • 문제 링크 6031번: Feeding Time It's Bessie's feeding time, and Farmer John is trying to decide where to put her. FJ has a farm that comprises W x H (1 2023. 7. 8. [백준] 5958 Space Exploration - Graph Theory / Java • 문제 링크 5958번: Space Exploration Farmer John's cows have finally blasted off from earth and are now floating around space in their Moocraft. The cows want to reach their fiery kin on Jupiter's moon of Io, but to do this they must first navigate through the dangerous asteroid belt. Bessie www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io... 2023. 7. 7. 이전 1 ··· 147 148 149 150 151 152 153 ··· 223 다음