Problem Solving1241 [백준] 11370 Spawn of Ungoliant - Graph Theory / Java • 문제 링크 11370번: Spawn of Ungoliant The first line of an input case is of the form W H, where W is the width of the map and H is the height. The next H lines contain strings of length W specifying the layout of Mirkwood. An S character represents a spider-infested tree, and an T character re www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOExc.. 2023. 9. 13. [백준] 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. 이전 1 ··· 121 122 123 124 125 126 127 ··· 207 다음