Problem Solving/Baekjoon1337 [백준] 13211 Passport Checking - Data Structure / Java • 문제 링크 13211번: Passport Checking The first line of the input contains an integer N. (1 ≤ N ≤ 100,000) The next N lines contains the list of N stolen passport numbers, one passport number per line. The next line of the input contains an integer M. (1 ≤ M ≤ 100,000) The next M lines www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; i.. 2023. 10. 31. [백준] 20170 Commemorative Dice - Brute Force / Java • 문제 링크 20170번: Commemorative Dice Since the year 2000, an ICPC regional contest has been held every year in Korea. To commemorate the 21st regional contest this year, it is decided to make a dice. The commemorative dice is a regular cube with a positive number written on each of its sides www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStr.. 2023. 10. 30. [백준] 20651 Daisy Chains - Brute Force / Java • 문제 링크 20651번: Daisy Chains Every picture containing just a single flower contributes to the count (there are four of these in the example). Also, the $(i,j)$ ranges $(1,2)$ and $(2,4)$ in this example correspond to pictures that have an average flower. www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; public class Main { publi.. 2023. 10. 29. [백준] 1487 물건 팔기 - Brute Force / Java • 문제 링크 1487번: 물건 팔기 첫째 줄에 최대 이익을 만들어주는 가격을 출력한다. 이익이 최대인 가격이 여러개라면, 가장 낮은 가격을 출력한다. 또, 어떤 가격으로 팔아도 이익을 남길 수 없다면 0을 출력한다. www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.Set; import java.util.TreeSet; public class Main { public static void main(String[] args) throws IOException { BufferedWriter bw = new Buffer.. 2023. 10. 28. [백준] 9881 Ski Course Design - Brute Force / Java • 문제 링크 9881번: Ski Course Design Farmer John has N hills on his farm (1 min) break; min = sum; } bw.write(String.valueOf(min)); bw.flush(); } private static int read() throws IOException { int c, n = System.in.read() & 15; while ((c = System.in.read()) > 32) n = (n 2023. 10. 27. [백준] 14626 ISBN - Brute Force / Java • 문제 링크 14626번: ISBN ISBN(International Standard Book Number)은 전 세계 모든 도서에 부여된 고유번호로, 국제 표준 도서번호이다. ISBN에는 국가명, 발행자 등의 정보가 담겨 있으며 13자리의 숫자로 표시된다. 그중 마지막 숫 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) t.. 2023. 10. 26. 이전 1 ··· 129 130 131 132 133 134 135 ··· 223 다음