https://www.acmicpc.net/problem/7578 7578번: 공장 어떤 공장에는 2N개의 기계가 2열에 걸쳐 N개씩 배치되어 있다. 이 2개의 열을 각각 A열과 B 열이라고 부른다. A열에 있는 N개의 기계는 각각이 B열에 있는 N개의 기계와 하나씩 짝을 이루어 케이블 www.acmicpc.net 10090번이랑 똑같은 문제 // https://www.acmicpc.net/problem/7578 // 공장 class Item { constructor(public value = 0) {} } class SegmentTree { private lg: number; private sz: number; private tree: Array; constructor(inputArray: Array)..
https://www.acmicpc.net/problem/2835 2835번: 인기도 조사 첫째 줄에 상근이가 살고 있는 나라의 국민의 수 N이 주어진다. (N ≤ 100,000) 다음 N개 줄에는 각 사람이 티비를 시청한 구간이 문제에서 설명한 대로 주어진다. (0 ≤ HH ≤ 23, 0 ≤ MM ≤ 59, 0 ≤ SS www.acmicpc.net // https://www.acmicpc.net/blog/view/117 // 느리게 갱신되는 세그먼트 트리의 비재귀 구현 class Node { constructor(value = 0, size = 0) { this.value = value; this.size = size; } } class NonRecursiveSegmentTreeWithLazyPropa..
https://www.acmicpc.net/problem/8120 8120번: Coding of Permutations Every permutation A = (a1, ..., an) of numbers 1, ..., n can be coded by a sequence B = (b1, ..., bn) in which bi equals the number of all aj such that (j ai), for i = 1, ..., n. The sequence B = (0, 0, 1, 0, 2, 0, 4) is the code of the pe www.acmicpc.net // https://www.acmicpc.net/problem/8120 // Coding of Permutation..
https://www.acmicpc.net/problem/28099 28099번: 이상한 배열 각 테스트케이스에 대해 주어진 배열이 이상한 배열이면 Yes, 아니라면 No를 출력한다. www.acmicpc.net // https://www.acmicpc.net/problem/28099 // 이상한 배열 class Item { constructor(public value = 0) {} } class SegmentTree { private lg: number; private sz: number; public tree: Array; constructor(inputArray: Array) { const inputArrayLength = inputArray.length; this.lg = Math.ceil(Mat..
https://www.acmicpc.net/problem/14725 14725번: 개미굴 첫 번째 줄은 로봇 개미가 각 층을 따라 내려오면서 알게 된 먹이의 정보 개수 N (1 ≤ N ≤ 1000)개가 주어진다. 두 번째 줄부터 N+1 번째 줄까지, 각 줄의 시작은 로봇 개미 한마리가 보내준 먹이 정 www.acmicpc.net // https://www.acmicpc.net/problem/14725 // 개미굴 class AntHillItem { constructor(word, end = false) { this.word = word; this.end = end; this.children = new Map(); } hasChild(word) { return this.children.has(word); ..
https://www.acmicpc.net/problem/2749 2749번: 피보나치 수 3 첫째 줄에 n이 주어진다. n은 1,000,000,000,000,000,000보다 작거나 같은 자연수이다. www.acmicpc.net // https://www.acmicpc.net/problem/2749 // 피보나치 수 3 // n > 2라면, k(10^n) = 15×10^(n-1) // k(1000000) = 15 * 100000; const N = require('fs').readFileSync('./dev/stdin').toString().trim(); const dp = new Array(1500000 + 1).fill(0); dp[0] = 0; dp[1] = 1; for (let i = 2; i
https://www.acmicpc.net/problem/2243 // https://www.acmicpc.net/problem/2243 // 사탕상자 class Item { constructor(public value = 0) {} } class SegmentTree { protected lg: number; protected sz: number; protected tree: Array; constructor(inputArray: Array) { const inputArrayLength = inputArray.length; this.lg = Math.ceil(Math.log2(inputArrayLength)); this.sz = 1
https://www.acmicpc.net/problem/3653 3653번: 영화 수집 각 테스트 케이스에 대해서 한 줄에 m개의 정수를 출력해야 한다. i번째 출력하는 수는 i번째로 영화를 볼 때 그 영화의 위에 있었던 DVD의 개수이다. 상근이는 매번 영화를 볼 때마다 본 영화 DVD www.acmicpc.net // https://www.acmicpc.net/problem/3653 // 영화 수집 //세그먼트 트리 비재귀 구현 class Item { constructor(value = 0) { this.value = value; } } class NonRecursiveSegmentTree { constructor(inputArray) { // build this.n = inputArray.leng..
- Total
- Today
- Yesterday
- 롱베케이션
- 다이나믹프로그래밍
- 그래프
- BFS
- 서버점검
- node.js
- 면접비
- 다이나밍프로그래밍
- 로드나인
- 은둔청년체험
- 개발자면접
- DB 생성
- 최소공통조상
- MOD
- 투포인터
- 서버개발
- 면접질문
- 투포인터 연습
- create databases;
- MySQL
- 동적프로그래밍
- create db
- KMP
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |