본문 바로가기

Problem Solving1245

[백준] 18294 Biodiversity - Data Structure / Java • 문제 링크 18294번: Biodiversity Alicia has a huge garden which is the habitat of many animals that she really cares about. After listening to a podcast about biodiversity, she becomes very concerned about the balance between species in her garden. She wants to know if there is a species www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException;.. 2023. 11. 4.
[백준] 4881 자리수의 제곱 - Data Structure / Java • 문제 링크 4881번: 자리수의 제곱 89, 145, 42, 20, 4, 16, 37, 58 사이클 1 사이클 www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.List; public class Main { public static void main(String[] args) throws IOException { BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); StringBui.. 2023. 11. 3.
[백준] 10105 Assigning Partners - Data Structure / Java • 문제 링크 10105번: Assigning Partners The input consists of three lines. The first line consists of an integer N (1 < N ≤ 30), which is the number of students in the class. The second line contains the first names of the N students separated by single spaces. (Names contain only uppercase or www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExcep.. 2023. 11. 2.
[백준] 9728 Pair Sum - Data Structure / Java • 문제 링크 9728번: Pair Sum You are given an integer array of size N and an integer M. This array has (N*(N-1))/2 different pairs. You need to calculate how many of those pairs have the sum equal to M. For example, if the array is {1,2,3,4} and M is 5, then there are exactly 2 pairs www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; .. 2023. 11. 1.
[백준] 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.