https://www.acmicpc.net/problem/24391 24391번: 귀찮은 해강이 첫째 줄에 강의의 개수 N(1 ≤ N ≤ 105)과 연결되어 있는 건물의 쌍의 개수 M(0 ≤ M ≤ 105)이 공백으로 구분되어 주어진다. 두 번째 줄부터는 M줄에 걸쳐 i와 j(1 ≤ i, j ≤ N)가 주어진다. 이는 i번 건 www.acmicpc.net class SubSet { constructor(i) { this.parent = i; this.rank = 0; } } class UF { constructor(N) { this.subsets = Array.from(Array(N), (_, i) => { return new SubSet(i); }); } find(i) { if (this.subsets..
https://www.acmicpc.net/problem/25556 25556번: 포스택 포닉스가 순열을 청소할 수 있으면 YES, 불가능하다면 NO를 출력한다. www.acmicpc.net class Node { constructor(item) { this.item = item; this.prev = null; } } class Stack { constructor() { this.top = null; this.size = 0; } empty() { return this.size === 0; } push(item) { const node = new Node(item); node.prev = this.top; this.top = node; this.size += 1; } pop() { const popIt..
https://www.acmicpc.net/problem/22252 22252번: 정보 상인 호석 암흑가의 권력은 주먹과 정보에서 나온다. 주먹은 한 명에게 강하고, 정보는 세계를 가지고 놀 수 있기 때문에 호석이는 세상 모든 정보를 모으는 "정보 상인"이 되고 싶다. 정보 상인은 정보를 www.acmicpc.net class MaxHeap { constructor() { this.heap = []; } swap(a, b) { [this.heap[a], this.heap[b]] = [this.heap[b], this.heap[a]]; } size() { return this.heap.length; } push(value) { this.heap.push(value); let current = this.he..
https://www.acmicpc.net/problem/23559 23559번: 밥 제주대 학생회관 식당에는 두 개의 메뉴가 있다. 코너 A로 가면 5,000원짜리 메뉴를 먹을 수 있고, 코너 B로 가면 1,000원짜리 메뉴를 먹을 수 있다. 준원이는 대면 수업이 시작되는 바람에 이제 남 www.acmicpc.net class PriorityQueue { constructor(callback) { this.heap = []; this.callback = callback; } swap(a, b) { const temp = { ...this.heap[a] }; this.heap[a] = this.heap[b]; this.heap[b] = temp; } size() { return this.heap.leng..
https://www.acmicpc.net/problem/23843 23843번: 콘센트 광재는 전자기기 대여사업을 시작했다. 퇴근하기 전에 다음날 손님들에게 빌려줄 N개의 전자기기를 충전하려 한다. 사용 가능한 콘센트는 M개가 있고, 성능은 모두 동일하다. 전자기기들은 한 www.acmicpc.net class MinHeap { constructor() { this.heap = []; } swap(a, b) { [this.heap[a], this.heap[b]] = [this.heap[b], this.heap[a]]; } size() { return this.heap.length; } push(value) { this.heap.push(value); let current = this.heap.lengt..
https://www.acmicpc.net/problem/7511 7511번: 소셜 네트워킹 어플리케이션 각 테스트 케이스마다 "Scenario i:"를 출력한다. i는 테스트 케이스 번호이며, 1부터 시작한다. 그 다음, 각각의 쌍마다 두 사람을 연결하는 경로가 있으면 1, 없으면 0을 출력한다. 각 테스트 케이스 www.acmicpc.net class Node { constructor(item) { this.item = item; this.next = null; } } class Queue { constructor() { this.head = null; this.tail = null; this.length = 0; } push(item) { const node = new Node(item); if (..
https://www.acmicpc.net/problem/1354 1354번: 무한 수열 2 첫째 줄에 5개의 정수 N, P, Q, X, Y가 주어진다. www.acmicpc.net const [N, P, Q, X, Y] = require('fs').readFileSync('./dev/stdin').toString().trim().split(' ').map(Number); let map = new Map(); map.set(0, 1); function dfs(n) { if (n
- Total
- Today
- Yesterday
- 서버개발
- create db
- 면접질문
- 로드나인
- 면접비
- 다이나믹프로그래밍
- 다이나밍프로그래밍
- 투포인터
- 최소공통조상
- MySQL
- 동적프로그래밍
- create databases;
- 투포인터 연습
- 서버점검
- 롱베케이션
- BFS
- node.js
- DB 생성
- 은둔청년체험
- MOD
- 개발자면접
- 그래프
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |