Algorithm/백준53 [백준] Gold IV. N-Queen https://www.acmicpc.net/problem/9663 사용 알고리즘백트래킹풀이import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { static int n; static int [] arr; static int count = 0; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); n = .. 2024. 5. 12. [백준] Silver.1 연산자 끼워넣기 https://www.acmicpc.net/problem/14888 사용 알고리즘백트래킹재귀풀이import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { static int n; static int [] nums; static int [] cal = new int [4]; static int max = Integer.MIN_VALUE; static int min = Integer.MAX_VALUE; public static void main(String[] args) throws IOException {.. 2024. 5. 9. [백준] Gold 4 카드 정렬하기 https://www.acmicpc.net/problem/1715 사용 알고리즘우선순위 큐 풀이import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); // 10만 , 제한시간 2초 .. 2024. 5. 7. [백준] Silver 1 절댓값 힙 https://www.acmicpc.net/problem/11286 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.util.*;public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); PriorityQueue pq = new PriorityQ.. 2024. 5. 7. 이전 1 ··· 9 10 11 12 13 14 다음