[백준] 9882 Balanced Teams - Backtracking / Java
• 문제 링크 9882번: Balanced Teams Output Details One possible solution is to divide the teams as follows: (12,1,7), (9,8,3), (10,5,4), and (11,2,6). The first two have skill 20 and the second two have skill 19. www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; ..
2023. 6. 8.
[백준] 18270 Livestock Lineup - Backtracking / Java
• 문제 링크 18270번: Livestock Lineup Every day, Farmer John milks his 8 dairy cows, named Bessie, Buttercup, Belinda, Beatrice, Bella, Blue, Betsy, and Sue. The cows are rather picky, unfortunately, and require that Farmer John milks them in an order that respects $N$ constraints ($1 \leq N \ www.acmicpc.net • 풀이 과정 • 풀이 코드 import java.io.BufferedReader; import java.io.BufferedWriter; import java.io..
2023. 6. 5.