백트래킹2 [백준 1987] 알파벳 / 자바 / 백트래킹 문제 레벨: G4알고리즘: 백트래킹풀이시간: 30분힌트 참조 유무: 무https://www.acmicpc.net/problem/19871 번째 시도 백트래킹 기본적인 문제굳이 설명을 적지 않겠다.import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.ArrayList;import java.util.Arrays;public class Main { static int ans = Integer.MIN_VALUE; static boolean[][] visited; static int[] dx = {1,0,0,-1}; static int[].. 2024. 6. 19. [백준] 치킨배달/ 자바** 문제 레벨: G5알고리즘: DFS+조합 풀이시간: 1시간 힌트 참조 유무: 유https://www.acmicpc.net/problem/15686 1 번째 시도 여느 BFS 문제랑 같다 생각하고 작성하였다import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.HashSet;import java.util.LinkedList;import java.util.Queue;import java.util.Set;//String[] s = br.readLine().split(" ");//Integer.parseInt(br.readLine());//int N = Inte.. 2024. 5. 21. 이전 1 다음