본문 바로가기

Problem Solving1244

[백준] 16283 Farm - Brute Force / Java • 문제 링크 16283번: Farm 입력은 표준입력을 사용한다. 첫 번째 줄에 네 정수 a, b, n, w가 한 줄에 주어진다. 1 ≤ a ≤ 1,000, 1 ≤ b ≤ 1,000, 2 ≤ n ≤ 1,000, 2 ≤ w ≤ 1,000,000이다. 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.. 2024. 2. 25.
[백준] 1681 줄 세우기 - Brute Force / Java • 문제 링크 1681번: 줄 세우기 민승이는 가장 작은 10개의 수 2, 3, 4, 5, 6, 7, 8, 9, 20, 22를 사용하여 라벨을 붙일 수 있다. www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { static int l; public static void main(String[] args) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int n = read(); l = r.. 2024. 2. 24.
[백준] 18312 시각 - Brute Force / Java • 문제 링크 18312번: 시각 정수 N과 K가 입력되었을 때 00시 00분 00초부터 N시 59분 59초까지의 모든 시각 중에서 K가 하나라도 포함되는 모든 시각을 세는 프로그램을 작성하시오. 시각을 셀 때는 디지털 시계를 기준으로, 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(Syste.. 2024. 2. 23.
[백준] 18295 Ants - Brute Force / Java • 문제 링크 18295번: Ants Charles is fascinated by ants. In order to observe a colony of ants over a long period, Charles managed to build a program that uniquely identifies each ant, using image recognition. (Yes, every ant is unique.) Inside the program, each ant is tagged with a www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import.. 2024. 2. 22.
[백준] 29994 Investigating Zeroes and Ones - Dynamic Programming / Java • 문제 링크 29994번: Investigating Zeroes and Ones You find yourself in a mysterious binary world, where an array of N binary digits awaits your scrutiny. Each digit is either a zero or a one, creating a unique pattern across the landscape. Your quest is to uncover the hidden patterns of this binary realm www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.i.. 2024. 2. 21.
[백준] 14767 Flow Shop - Dynamic Programming / Java • 문제 링크 14767번: Flow Shop There is only one test case in each file. It begins with a single line containing N and M (1 ≤ N, M ≤ 1000), the number of swathers and stages (respectively). Following this are N lines, each with M integers. The j’th integer of the i’th line is Pi www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; publi.. 2024. 2. 20.