Problem Solving/Baekjoon1337 [백준] 6601 Knight Moves - Graph Theory / Java • 문제 링크 6601번: Knight Moves A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the most difficult part www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; .. 2024. 1. 5. [백준] 8975 PJESMA - Data Structure / Java • 문제 링크 8975번: PJESMA "Guess the song" is a popular game among young programmers in Croatia. It is a game of skill, wisdom and patience. The game host plays a song so that all players hear it. The players' goal is to guess the title of the song as fast as possible. Mirko may www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import j.. 2024. 1. 4. [백준] 9843 LVM - Data Structure / Java • 문제 링크 9843번: LVM The first line of the input contains an integer n between 2 and 1000, indicating the number of instructions of the program. The following n lines contain the program instructions. Arguments are separated by a space character from the preceding instruction. www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import j.. 2024. 1. 3. [백준] 6119 Cow Line - Data Structure / Java • 문제 링크 6119번: Cow Line Farmer John's N cows (conveniently numbered 1..N) are forming a line. The line begins with no cows and then, as time progresses, one by one, the cows join the line on the left or right side. Every once in a while, some number of cows on the left or right s www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; imp.. 2024. 1. 2. [백준] 2371 파일 구별하기 - Data Structure / Java • 문제 링크 2371번: 파일 구별하기 메모리에 N개의 파일이 저장되어 있다. 이 문제에서는 편의상 각각의 파일을 수열과 같이 생각하자. 이와 같은 파일들을 구별하기 위해서는 두 개의 파일을 맨 끝까지 읽어보는 작업을 수행해야 www.acmicpc.net • 풀이 코드 import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; public class Main { static List lists = new ArrayList.. 2024. 1. 1. [백준] 15323 ZigZag - Data Structure / Java • 문제 링크 15323번: ZigZag Zig and Zag are playing a word game. Zig says one letter, and Zag says a word that starts with that letter. However, the word needs to be from the allowed word list and such that Zag already said it the least amount of times. If the word choice is ambiguou www.acmicpc.net • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; impo.. 2023. 12. 31. 이전 1 ··· 118 119 120 121 122 123 124 ··· 223 다음