본문 바로가기

Problem Solving/Baekjoon1336

[백준] 14544 Vote - Data Structure / Java • 문제 링크 14544번: Vote The first line of input contains a single integer P, (1 ≤ P ≤ 1000), which is the number of data sets that follow. Each data set consists of a line containing the number n of the candidates (1 ≤ n ≤ 100), a space and the number m of results to cent www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.. 2023. 9. 12.
[백준] 11235 Polling - Data Structure / Java • 문제 링크 11235번: Polling Output the name of the candidate with the most votes. If there is a tie, output out all of the names of candidates with the most votes, one per line, in alphabetical order. Do not output any spaces, and do not output blank lines between names. www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.I.. 2023. 9. 11.
[백준] 16815 Star in Parentheses - Data Structure / Java • 문제 링크 16815번: Star in Parentheses You are given a string $S$, which is balanced parentheses with a star symbol * inserted. Any balanced parentheses can be constructed using the following rules: An empty string is balanced. Concatenation of two balanced parentheses is balanced. If $T$ is ba www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOEx.. 2023. 9. 10.
[백준] 18679 Banana - Data Structure / Java • 문제 링크 18679번: Banana The first line of input will contain a single integer N, the number of words in the dictionary (1 ≤ N ≤ 100). The following N lines will each contain a sentence of the format x = y where x is an English word and y is a Minionese word. The next line wil www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import j.. 2023. 9. 9.
[백준] 5089 Travelling Salesman - Data Structure / Java • 문제 링크 5089번: Travelling Salesman Output consists of a single line for each week. It contains the word Week, followed by a space, followed by the week number, the first week being 1, followed by a space, followed by the actual number of towns to be visited, duplicates having been removed. www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExce.. 2023. 9. 8.
[백준] 15098 No Duplicates - Data Structure / Java • 문제 링크 15098번: No Duplicates Input is a line containing words separated by single spaces, where a word consists of one or more uppercase letters. A line contains no more than 80 characters. 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.HashSet.. 2023. 9. 7.