728x90

문제

 

 

접근 방식

이분 그래프의 개념만 알면 BFS나 DFS로 쉽게 풀 수 있는 문제다.

 

 

위와 같은 그래프가 주어졌을 때 DFS 탐색 순서는 아래와 같다.

1 > 2 > 3 > 4 > 2 > 4

 

이분 그래프는 모든 정점을 두 가지 색으로만 칠할 수 있다고 생각하면 되는데

인접한 정점을 방문할 때마다 현재 정점과 반대되는 색깔로 칠하다

만약 다음에 방문할 정점이 이미 색이 칠해져있고 현재 정점과 색깔이 같다면

이분 그래프가 아니라는 것을 알 수 있다.

1번 정점 방문 => 1번 정점 빨간색으로 색칠
2번 정점 방문 => 2번 정점 파란색으로 색칠
3번 정점 방문 => 3번 정점 빨간색으로 색칠
4번 정점 방문 => 4번 정점 파란색으로 색칠
2번 정점 방문 => 2번 정점 빨간색으로 색칠 (이미 파란색인데 빨간색으로 칠할 수 없음)

== 이분 그래프가 아님

 

위와 같은 순서로 진행된다.

 

DFS로 풀었는데 인접 정점 방문하며 색칠하는거라 BFS로 푸는게 더 효율적일거 같다

 

풀이

public class Main {

	private static int v, e, x, y;
	private static ArrayList<ArrayList<Integer>> near;
	private static int[] paint;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		StringBuilder sb = new StringBuilder();

		int t = Integer.parseInt(br.readLine());

		while (t-- > 0) {
			st = new StringTokenizer(br.readLine());

			v = Integer.parseInt(st.nextToken());
			e = Integer.parseInt(st.nextToken());

			near = new ArrayList<>();
			paint = new int[v + 1];
			boolean isBipartite = true;

			for (int i = 0; i <= v; i++) {
				near.add(new ArrayList<>());
			}

			while (e-- > 0) {
				st = new StringTokenizer(br.readLine());

				x = Integer.parseInt(st.nextToken());
				y = Integer.parseInt(st.nextToken());

				near.get(x).add(y);
				near.get(y).add(x);
			}

			for (int i = 1; i <= v; i++) {
				if (paint[i] != 0) continue;
				if (!dfs(i, -1)) {
					isBipartite = false;
					break;
				}
			}

			if (isBipartite) sb.append("YES").append("\n");
			else sb.append("NO").append("\n");
		}

		System.out.println(sb);
	}

	private static boolean dfs(int cur, int prev) {
		int color = -(prev);
		paint[cur] = color;

		for (int next : near.get(cur)) {
			if (paint[next] == color) return false;
			else if (paint[next] == -color) continue;
			if (!dfs(next, color)) return false;
		}

		return true;
	}
}

 

'Java > Algorithms' 카테고리의 다른 글

[백준] 1043번 : 거짓말  (0) 2024.01.27
[백준] 2617번 : 구슬 찾기  (1) 2024.01.26
[백준] 2660번 : 회장뽑기  (0) 2024.01.24
[백준] 1260번 : DFS와 BFS  (1) 2024.01.24
[백준] 11724번 : 연결 요소의 개수  (0) 2024.01.24
728x90

문제

 

 

접근 방식

한 사람이 모든 사람을 친구의 친구의 친구...의 친구 까지 걸치고 걸쳐

모두 알 수 있다고 가정 했을 때

모든 사람을 알기 위해 필요한 단계가 가장 짧은 사람을 구해야 한다.

1 2
2 3
3 4
4 5
2 4
5 3

 

위와 같은 관계가 주어졌을 때 2번 사람의 경우를 살펴보면 아래와 같다.

본인
2

친구
1 3 4

친구의 친구
5

 

2번 자기 자신과 직접적으로 친구 관계인 1, 3, 4번이 있고

5번은 3번의 친구니 친구의 친구 관계이고

2번이 모든 사람을 알기 위해 필요한 단계는 친구의 친구까지다.

 

즉, 본인 0단계, 친구 1단계, 친구의 친구 2단계로

2단계만 거치면 모든 사람을 알 수 있다.

 

이때 조심해야 할 점은 2번이 5번을 알 수 있는 방법이 두 가지인데

첫 번째는 2 >> 3 >> 4 >> 5 순서로 총 3단계를 걸치는 것이고

두 번째는 2 >> 3 >> 5 순서로 총 2단계를 걸치는 것이다.

 

이 중에서 가장 짧은 2단계를 선택해야 하므로

이미 방문한 곳이라도 더 빨리 방문할 수 있다면

기존에 기록해두었던 3단계를 2단계로 바꿔주면 된다.

 

 

풀이

public class Main {

	private static int n;
	private static int max;
	private static ArrayList<ArrayList<Integer>> near = new ArrayList<>();
	private static int[] scores;
	private static int[] friends;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		StringBuilder sb = new StringBuilder();

		n = Integer.parseInt(br.readLine());
		scores = new int[n + 1];
		friends = new int[n + 1];
		int min = n + 1;
		int count = 0;

		for (int i = 0; i <= n; i++) {
			near.add(new ArrayList<>());
		}

		while (true) {
			st = new StringTokenizer(br.readLine());

			int x = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());

			if (x == y && x == -1) break;

			near.get(x).add(y);
			near.get(y).add(x);
		}

		for (int i = 1; i <= n; i++) {
			Arrays.fill(friends, -1);
			dfs(i, -1);
			max = 0;

			for (int j = 1; j <= n; j++) {
				max = Math.max(friends[j], max);
			}

			scores[i] = max;

			if (min > max) {
				count = 1;
				min = max;
			} else if (min == max) {
				count++;
			}
		}

		sb.append(min).append(" ").append(count).append("\n");
		for (int i = 1; i <= n; i++) {
			if (scores[i] == min) sb.append(i).append(" ");
		}

		System.out.println(sb);
	}

	private static void dfs(int cur, int prev) {
		int score = prev + 1;
		friends[cur] = score;

		for (int next : near.get(cur)) {
			if (friends[next] != -1) {
				if (friends[next] > score + 1) {
					dfs(next, score);
				}
				continue;
			}
			dfs(next, score);
		}
	}
}

 

728x90

문제

 

 

접근 방식

DFS와 BFS 방식으로 탐색하는 순서를 순서대로 출력하면 된다.

문제를 대충 보고 인접 리스트로 풀었더니 예제가 틀리길래

다시보니 작은 번호의 정점부터 방문하는 조건이 있어서 인접 행렬로 바꿔 풀었다.

 

양방향 그래프이기 때문에 양쪽 간선에 모두 이동할 수 있게

인접 행렬에 표시해주고 DFS와 BFS 순서대로 탐색을 진행해주면서

정점에 방문할 때마다 출력해주면 된다.

 

풀이

public class Main {

	private static int n;
	private static int[][] nearArr;
	private static boolean[] isVisited;
	private static StringBuilder sb = new StringBuilder();

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());

		n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int v = Integer.parseInt(st.nextToken());

		isVisited = new boolean[n + 1];
		nearArr = new int[n + 1][n + 1];

		while (m-- > 0) {
			st = new StringTokenizer(br.readLine());

			int x = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());

			nearArr[x][y] = 1;
			nearArr[y][x] = 1;
		}

		dfs(v);
		sb.append("\n");

		bfs(v);

		System.out.println(sb);
	}

	private static void bfs(int start) {
		isVisited = new boolean[n + 1];

		Queue<Integer> q = new ArrayDeque<>();

		q.offer(start);
		isVisited[start] = true;
		sb.append(start).append(" ");

		while (!q.isEmpty()) {
			int cur = q.poll();

			for (int i = 1; i <= n; i++) {
				if (isVisited[i] || nearArr[cur][i] != 1) continue;
				q.offer(i);
				isVisited[i] = true;
				sb.append(i).append(" ");
			}
		}
	}

	private static void dfs(int cur) {
		isVisited[cur] = true;
		sb.append(cur).append(" ");

		for (int i = 1; i <= n; i++) {
			if (isVisited[i] || nearArr[cur][i] != 1) continue;
			dfs(i);
		}
	}
}

 

'Java > Algorithms' 카테고리의 다른 글

[백준] 1707번 : 이분 그래프  (1) 2024.01.24
[백준] 2660번 : 회장뽑기  (0) 2024.01.24
[백준] 11724번 : 연결 요소의 개수  (0) 2024.01.24
[백준] 7662번 : 이중 우선순위 큐  (0) 2024.01.24
[백준] 1781번 : 컵라면  (1) 2024.01.22
728x90

문제

 

 

접근 방식

끊기지 않고 연결된 묶음이 몇 개인지 찾는 문제로 BFS와 DFS 둘 중 아무거나 사용해서

풀 수도 있고, 인접 행렬이나 인접 리스트 중 아무거나 사용해도 상관없기에

BFS를 사용해서 인접 행렬과 인접 리스트 둘 다 사용해 풀어봤다.

 

문제에서 주어진 그래프는 무방향 그래프이기 때문에

인접 행렬이나 리스트를 만들 때 (x, y)와 (y, x) 모두 추가해줘야 한다.

 

인접 행렬의 경우에는 0과 1로 구분해서 간선이 존재하는 경우를 1로 표현해주면 되고

인접 리스트의 경우에는 해당 정점에서 이동할 수 있는 정점을 추가해주면 된다.

 

풀이

 

인접 행렬을 사용한 풀이

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());

		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int count = 0;

		int[][] nearArr = new int[n + 1][n + 1];
		boolean[] isVisited = new boolean[n + 1];

		Queue<Integer> q = new ArrayDeque<>();

		for (int i = 0; i < m; i++) {
			st = new StringTokenizer(br.readLine());

			int x = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());

			nearArr[x][y] = 1;
			nearArr[y][x] = 1;
		}

		for (int i = 1; i <= n; i++) {
			if (isVisited[i]) continue;
			count++;
			q.offer(i);
			isVisited[i] = true;

			while (!q.isEmpty()) {
				int cur = q.poll();

				for (int j = 0; j <= n; j++) {
					if (nearArr[cur][j] != 1 || isVisited[j]) continue;
					q.offer(j);
					isVisited[j] = true;
				}
			}
		}

		System.out.println(count);
	}
}

 

인접 리스트를 사용한 풀이

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());

		int n = Integer.parseInt(st.nextToken());
		int m = Integer.parseInt(st.nextToken());
		int count = 0;

		ArrayList<ArrayList<Integer>> nearList = new ArrayList<>();
		boolean[] isVisited = new boolean[n + 1];

		Queue<Integer> q = new ArrayDeque<>();

		for (int i = 0; i <= n; i++) {
			nearList.add(new ArrayList<>());
		}

		for (int i = 0; i < m; i++) {
			st = new StringTokenizer(br.readLine());

			int x = Integer.parseInt(st.nextToken());
			int y = Integer.parseInt(st.nextToken());

			nearList.get(x).add(y);
			nearList.get(y).add(x);
		}

		for (int i = 1; i <= n; i++) {
			if (isVisited[i]) continue;
			count++;
			q.offer(i);
			isVisited[i] = true;

			while (!q.isEmpty()) {
				int cur = q.poll();

				for (int near : nearList.get(cur)) {
					if (isVisited[near]) continue;
					q.offer(near);
					isVisited[near] = true;
				}
			}
		}

		System.out.println(count);
	}
}

'Java > Algorithms' 카테고리의 다른 글

[백준] 2660번 : 회장뽑기  (0) 2024.01.24
[백준] 1260번 : DFS와 BFS  (1) 2024.01.24
[백준] 7662번 : 이중 우선순위 큐  (0) 2024.01.24
[백준] 1781번 : 컵라면  (1) 2024.01.22
[백준] 1655번 : 가운데를 말해요  (1) 2024.01.22
728x90

문제

 

 

접근 방식

우선순위 큐를 활용해서 풀 수 있는 문제로 우선순위 큐를 덱처럼 사용하면 된다.

 

원할 때마다 언제든지 가장 작은 값을 빼거나 가장 큰 값을 뺄 수 있어야 하기 때문에

최소힙과 최대힙에 동일하게 수를 추가해 준 후에

가장 큰 값을 빼야 하는 경우에는 최대힙에서 반대의 경우는 최소힙에서 빼주면 된다.

 

이때 조심해야할게 반대쪽에서 뺀 수는 반대쪽에만 사라지고 다른 한쪽에는 존재하기 때문에

맵을 이용해서 수마다 등장 횟수를 카운팅 해준 후에 수들을 큐에서 꺼낼 때마다

꺼낸 수가 등장 횟수가 남아있는지 확인하여 다른 쪽의 큐와 상태를 유지해 줄 수 있다.

 

예를 들면 최대값을 하나 빼려고 최대힙에서 9라는 숫자를 꺼냈는데

해당 숫자의 카운트가 0이라면 최소힙에서 빼서 사라진 값이기에

해당 수를 건너 뛰고 최대힙에서 카운트가 0이 아닌 수를 찾을 때까지

계속해서 수를 꺼내주면 된다.

 

풀이

public class Main {

	private static HashMap<Integer, Integer> countMap;

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;
		StringBuilder sb = new StringBuilder();

		int t = Integer.parseInt(br.readLine());

		while (t-- > 0) {
			int k = Integer.parseInt(br.readLine());

			PriorityQueue<Integer> minQ  = new PriorityQueue<>();
			PriorityQueue<Integer> maxQ  = new PriorityQueue<>(Collections.reverseOrder());
			countMap = new HashMap<>();

			while (k-- > 0) {
				st = new StringTokenizer(br.readLine());

				String command = st.nextToken();
				int n = Integer.parseInt(st.nextToken());

				if (command.equals("I")) {
					minQ.offer(n);
					maxQ.offer(n);
					countMap.put(n, countMap.getOrDefault(n, 0) + 1);
					continue;
				}

				if (countMap.isEmpty()) continue;

				poll(n > 0 ? maxQ : minQ);
			}

			if (countMap.isEmpty()) sb.append("EMPTY").append("\n");
			else {
				int max = poll(maxQ);
				sb.append(max).append(" ").append(countMap.isEmpty() ? max : poll(minQ)).append("\n");
			}
		}

		System.out.println(sb);
	}

	private static int poll(PriorityQueue<Integer> pq) {
		int num = 0;

		while (true) {
			num = pq.poll();
			int count = countMap.getOrDefault(num, 0);

			if (count == 0) continue;

			if (count == 1) countMap.remove(num);
			else countMap.put(num, count - 1);

			break;
		}

		return num;
	}
}

 

'Java > Algorithms' 카테고리의 다른 글

[백준] 1260번 : DFS와 BFS  (1) 2024.01.24
[백준] 11724번 : 연결 요소의 개수  (0) 2024.01.24
[백준] 1781번 : 컵라면  (1) 2024.01.22
[백준] 1655번 : 가운데를 말해요  (1) 2024.01.22
[백준] 1715번 : 카드 정렬하기  (1) 2024.01.22
728x90

문제

 

 

접근 방식

정말 쉬운데 하고 풀었다가 바로 틀려버린 문제다...

 

데드라인이 빠른 순으로 정렬하고 같다면 보상이 큰 순으로 정렬한 후에

그대로 반복문을 돌면서 더해줬더니 예제는 맞지만 제출하니 틀렸다.

 

예제가 하나뿐이라 생각하지 못한 케이스가 있었는데

데드라인이 나중이라도 이전 데드라인 문제를 생략하고

이후의 데드라인 문제를 푸는 것이 좋을 때가 있다.

2 30
2 20
3 60
3 50

 

위와 같이 데드라인이 2일 때 2개를 선택하는 것보단

둘 다 선택하지 않고 데드라인이 3일 때를 선택하는 것이 더 효율적이다.

 

그래서 정렬은 그대로 유지하되 최소힙을 사용해 이전에 선택한 값이

이후에 선택할 값보다 비효율적인 경우 교체해줘야 한다.

2 30
2 20
최소힙 {20, 30}

3 60
최소힙 {30, 60}

3 50
최소힙 {50, 60}

 

예를 들어, 위와 같이 데드라인이 2인 경우를 모두 최소힙에 넣어둔 후에

데드라인이 3이고 보상이 60일 때는 최소힙에 있는 20과 60을 교체해주면 될 것이고

다음 경우인 데드라인이 3이고 보상이 50인 경우도 30과 50을 교체해주면 된다.

 

 

풀이

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st;

		int n = Integer.parseInt(br.readLine());
		long max = 0;

		PriorityQueue<Exam> sorted = new PriorityQueue<>(
			(o1, o2) -> o1.d != o2.d ? o1.d - o2.d : -(o1.c - o2.c)
		);

		PriorityQueue<Integer> cup = new PriorityQueue<>();

		for (int i = 0; i < n; i++) {
			st = new StringTokenizer(br.readLine());

			sorted.offer(new Exam(st.nextToken(), st.nextToken()));
		}

		while (!sorted.isEmpty()){
			Exam exam = sorted.poll();

			int size = cup.size();

			if (size < exam.d) {
				cup.offer(exam.c);
				max += exam.c;
			}
			else if (size == exam.d && cup.peek() < exam.c) {
				int prev = cup.poll();
				cup.offer(exam.c);
				max += (exam.c - prev);
			}
		}

		System.out.println(max);
	}

	private static class Exam {
		int d;
		int c;

		public Exam(String d, String c) {
			this.d = Integer.parseInt(d);
			this.c = Integer.parseInt(c);
		}
	}
}

 

728x90

문제

 

 

접근 방식

수가 하나씩 추가될 때마다 현재까지의 수 중에서 중간값을 출력해야 하고

현재까지 부른 수가 짝수 개면 중간값은 둘 중 더 작은 수를 출력한다.

 

무식하게 생각하면 매번 수를 부를 때마다 정렬해서 중간 인덱스를 출력하는

방법을 떠올릴 수 있지만 문제의 제한 시간과 입력을 생각하면 불가능하다.

 

최소힙과 최대힙 우선순위 큐를 각각 하나씩 만들어서 특정 상황에 맞게

수를 저장하고 꺼내는 방식으로 효율적으로 풀 수 있는 문제다.

 

예를 들어 현재까지 주어진 수가 짝수 개일 때를 생각해 보면

현재 수가 이전까지의 중간값보다 작은 경우를 살펴보면 다음과 같다.

4 5 10 (11) 12 15 20	// 중간값 11
>> 6 이 입력으로 들어옴
4 5 6 (10 11) 12 15 20 // 중간값이 두개지만 더 작은 10을 선택

 

짝수일 때는 중간 값이 두 개가 될 수 있고 이 중에서 가장 작은 첫 번째 값을

골라야 하기 때문에 이 때는 최대힙에서 값을 꺼내 중간값으로 바꿔주고

이전의 중앙값을 최소힙에 다시 넣어준다.

최대힙 6 5 4
중간값 10
최소힙 11 12 15 20

 

위와 같이 최대힙, 중간값, 최소힙이 구성된다.

 

즉, 최대힙에서는 중간값보다 작은 값들을, 최소힙에서는 중간값보다 큰 값들을

정렬된 상태로 꺼낼 수 있으니 입력받은 수가 중간값보다 큰지 작은지에 따라

상황에 맞게 수를 꺼내고 저장하면 매번 정렬을 하지 않고 중간값을 알 수 있다.

 

풀이

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();

		int n = Integer.parseInt(br.readLine());
		PriorityQueue<Integer> right = new PriorityQueue<>();
		PriorityQueue<Integer> left = new PriorityQueue<>(Collections.reverseOrder());

		int center = Integer.parseInt(br.readLine());
		sb.append(center).append("\n");

		for (int i = 2; i <= n; i++) {
			int x = Integer.parseInt(br.readLine());

			if (i % 2 == 0) {
				if (center > x) {
					left.offer(x);
					right.offer(center);
					center = left.poll();
				} else {
					right.offer(x);
				}
			} else {
				if (center <= x) {
					right.offer(x);
					left.offer(center);
					center = right.poll();
				} else {
					left.offer(x);
				}
			}

			sb.append(center).append("\n");
		}

		System.out.println(sb);
	}
}

 

'Java > Algorithms' 카테고리의 다른 글

[백준] 7662번 : 이중 우선순위 큐  (0) 2024.01.24
[백준] 1781번 : 컵라면  (1) 2024.01.22
[백준] 1715번 : 카드 정렬하기  (1) 2024.01.22
[백준] 2075번 : N번째 큰 수  (0) 2024.01.22
[백준] 1927번 : 최소 힙  (0) 2024.01.22
728x90

문제

 

 

접근 방식

맨 처음에 문제를 풀 때는 잘못 이해해서 정렬을 사용해서 풀 수도 있을 줄 알았는데

문제를 제대로 이해하고 보니 중간중간 계산 결과를 다시 넣을 때마다

정렬을 한다면 매우 비효율적이기 때문에 우선순위 큐를 사용해서 풀었다.

10 // 10개의 수가 주어졌을 때
123
456
234
998
12
7
876
887
455
234

 

만약 위와 같은 입력이 주어졌을 때 계산 순서는 다음과 같다.

7 + 12 = 19
19 + 123 = 142
142 + 234 = 376
376 + 234 = 610
610 + 455 = 1065
1065 + 456 = 1521
1521 + 876 = 2397
2397 + 887 = 3284
3284 + 998 = 4282

 

위 순서대로 계산하여 결과를 모두 더하면 13696이라는 답이 나오는데

이는 잘못된 풀이다.

7 + 12 = 19
19 + 123 = 142
142 + 234 = 376
234 + 376 = 610
455 + 456 = 911
610 + 876 = 1486
887 + 911 = 1798
998 + 1486 = 2484
1798 + 2484 = 4282

 

위와 같이 계산해서 결과를 모두 더했을 때 12108이라는 답이 나와야 정답이다.

 

처음 입력 받은 것을 정렬된 상태로 그대로 더하기만 해서 되는 문제가 아니라

두 카드 묶음을 더할 때마다 생기는 하나의 카드 묶음을 포함해서

다시 정렬된 상태로 계산해야 하기 때문이다.

 

이런 문제 때문에 처음 언급했던 것처럼 매번 정렬을 할 수도 없기 때문에

우선순위 큐를 사용해서 풀면 효율적인 것이다.

 

최소 힙의 규칙을 통해 항상 오름차순으로 우선순위 큐에서 값을 넣고 꺼낼 수 있기 때문에

두 카드 묶음을 합치고 합친 값을 다시 큐에 넣고 이를 반복하기만 하면

매번 정렬을 할 필요 없이 효율적으로 계산할 수 있다.

 

 

풀이

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());
		int sum = 0;
		int min = 0;

		PriorityQueue<Integer> pq = new PriorityQueue<>();

		for (int i = 0; i < n; i++) pq.offer(Integer.parseInt(br.readLine()));

		while (!pq.isEmpty()) {
			if (sum == 0) sum = pq.poll();
			else {
				sum += pq.poll();
				pq.offer(sum);
				min += sum;
				sum = 0;
			}
		}

		System.out.println(min);
	}
}

 

'Java > Algorithms' 카테고리의 다른 글

[백준] 1781번 : 컵라면  (1) 2024.01.22
[백준] 1655번 : 가운데를 말해요  (1) 2024.01.22
[백준] 2075번 : N번째 큰 수  (0) 2024.01.22
[백준] 1927번 : 최소 힙  (0) 2024.01.22
[백준] 11286번 : 절댓값 힙  (1) 2024.01.21

+ Recent posts